/* Site-scan quiz — phone first (390), centred 460 px column on desktop. Accent colours come from /theme.css. */
@font-face { font-family: 'Inter'; src: url('/fonts/inter-var.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Inter Tight'; src: url('/fonts/inter-tight-var.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  --ink: #0F1729; --ink2: #3A4354; --mute: #5B6474; --line: #E4E7EC; --panel: #F5F6F8; --green: #12925F; --green-d: #0B7A4E; --green-50: #E7F5EE;
  --acc: #5B3A9E; --acc-2: #7F5BC9; --acc-50: #F4F1F8; --acc-100: #E8E3F1; --acc-glow: #5B3A9E59; --err: #B42318;
  --r: 16px; --r-sm: 12px; --col: 460px;
  --shadow: 0 1px 2px rgba(15, 23, 41, .04), 0 6px 20px rgba(15, 23, 41, .05);
  --e-out: cubic-bezier(.22, 1, .36, 1);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #fff; color: var(--ink); font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
p, h1, h2, h3, ul, ol { margin: 0; }
img, svg { display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
h1:focus, h1:focus-visible { outline: none; }

/* top */
.progress { height: 6px; background: var(--line); }
.progress-fill { height: 100%; width: 20%; background: linear-gradient(90deg, var(--acc), var(--acc-2)); border-radius: 0 3px 3px 0; transition: width .45s var(--e-out); }
.top { display: flex; justify-content: center; padding: 18px 0 8px; }
.logo { height: 28px; width: auto; }

/* column + screens */
.col { max-width: var(--col); margin: 0 auto; padding: 0 16px; }
.screen { padding: 14px 0 24px; }
.screen.center { min-height: calc(100svh - 60px); display: flex; flex-direction: column; justify-content: center; padding-bottom: 12svh; }
.h1 { font-family: 'Inter Tight', 'Inter', sans-serif; font-weight: 700; font-size: 31px; line-height: 1.12; letter-spacing: -.035em; text-align: center; text-wrap: balance; }
.h1-sm { font-size: 27px; }
.sub { margin-top: 10px; color: var(--mute); text-align: center; font-size: 16.5px; text-wrap: balance; }
.h2 { font-family: 'Inter Tight', 'Inter', sans-serif; font-weight: 700; font-size: 17px; letter-spacing: -.02em; margin-bottom: 14px; }
.h3 { color: var(--mute); font-size: 14px; font-weight: 500; margin: 18px 0 6px; }

/* cards + fields */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 20px; }
.form { padding: 24px; }
.field { width: 100%; height: 50px; padding: 0 16px; font: inherit; font-size: 16px; color: var(--ink); text-align: center; background: #F9FAFB; border: 1px solid var(--line); border-radius: var(--r-sm); appearance: none; transition: border-color .15s, box-shadow .15s; }
.field-left { text-align: left; }
.field::placeholder { color: #7A8394; }
.field:focus { outline: none; border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-100); background: #fff; }
.field[aria-invalid="true"] { border-color: var(--err); }
.field-err { margin-top: 8px; color: var(--err); font-size: 14px; text-align: center; }
.fine { margin-top: 18px; color: var(--mute); font-size: 14.5px; text-align: center; text-wrap: balance; }

/* primary pill button */
.btn { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; height: 52px; margin-top: 16px; padding: 0 20px; border: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--acc), var(--acc-2)); color: #fff; font: 600 17px/1 'Inter', sans-serif; text-decoration: none; cursor: pointer;
  box-shadow: 0 8px 24px var(--acc-glow), inset 0 1px 0 rgba(255, 255, 255, .18); transition: transform .12s, box-shadow .2s, filter .2s; -webkit-tap-highlight-color: transparent; }
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: scale(.985); }
.btn:focus-visible { outline: 3px solid var(--acc-100); outline-offset: 3px; }
.btn[disabled] { cursor: default; }
.btn .spinner { position: absolute; width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; opacity: 0; }
.btn.busy .btn-label { opacity: 0; }
.btn.busy .spinner { opacity: 1; animation: spin .8s linear infinite; }
.sticky { position: sticky; bottom: 0; z-index: 5; margin-top: 4px; padding: 26px 0 calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(rgba(255, 255, 255, 0), #fff 42%); }
.sticky .btn { margin-top: 0; }

/* step 1 + 3 motifs (textless, CSS only) */
.motif { width: 150px; height: auto; margin: 26px auto 22px; overflow: visible; }
.m-frame, .m-paper { fill: #fff; stroke: var(--line); stroke-width: 2; }
.m-bar { stroke: var(--line); stroke-width: 2; }
.m-dot { fill: var(--line); }
.m-ln { fill: var(--panel); animation: m-fill .5s ease forwards; }
.m-ln1 { animation-delay: .75s; } .m-ln2 { animation-delay: 1.15s; } .m-ln3 { animation-delay: 1.55s; }
.m-scan { fill: var(--acc); opacity: 0; animation: m-scan 1.7s var(--e-out) .45s 1 forwards; }
@keyframes m-scan { 0% { opacity: 0; transform: translateY(0); } 12% { opacity: .9; } 85% { opacity: .9; } 100% { opacity: 0; transform: translateY(52px); } }
@keyframes m-fill { to { fill: var(--acc-100); } }
.motif-mail .m-env { fill: #fff; stroke: var(--line); stroke-width: 2; }
.motif-mail .m-flap { fill: none; stroke: var(--acc-100); stroke-width: 2; }
.motif-mail .m-paper, .motif-mail .m-ln { animation: m-rise 1s var(--e-out) .3s both; }
.motif-mail .m-ln { fill: var(--acc-100); }
@keyframes m-rise { from { transform: translateY(26px); } to { transform: translateY(0); } }

/* step 2 · languages */
.langs { padding: 16px; }
.lang-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.lang { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; min-height: 84px; padding: 12px 6px; background: #fff; color: var(--ink2);
  border: 1px solid var(--line); border-radius: var(--r-sm); font: 500 14px/1.25 'Inter', sans-serif; text-align: center; cursor: pointer; transition: border-color .15s, background .15s, color .15s; -webkit-tap-highlight-color: transparent; }
.lang img { width: 28px; height: 20px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(15, 23, 41, .06); }
.lang:hover { border-color: #CDD2DA; }
.lang[aria-checked="true"] { border-color: var(--acc); box-shadow: inset 0 0 0 1px var(--acc); background: var(--acc-50); color: var(--acc); font-weight: 600; }
.empty { padding: 24px 0 8px; color: var(--mute); text-align: center; }

/* step 4 · loader */
.loader { background: var(--panel); border-color: transparent; box-shadow: none; padding: 30px 22px 28px; text-align: center; }
.orbit { position: relative; width: 104px; height: 104px; margin: 26px auto 10px; }
.orbit::before, .orbit::after { content: ''; position: absolute; inset: 0; border-radius: 50%; }
.orbit::before { border: 3px solid var(--acc-100); border-top-color: var(--acc); animation: spin 1.1s linear infinite; }
.orbit::after { inset: 10px; background: #fff; box-shadow: 0 0 0 0 var(--acc-glow); animation: pulse 1.8s ease-out infinite; }
.orbit .fav { position: absolute; z-index: 1; inset: 24px; }
.loader-domain { color: var(--mute); font-size: 15px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticks { list-style: none; padding: 0; margin: 20px auto 0; display: grid; gap: 12px; max-width: 300px; text-align: left; }
.ticks li { display: flex; align-items: center; gap: 12px; color: #7A8394; font-size: 15.5px; transition: color .2s; }
.ticks .dot { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #D5DAE2; transition: background .2s, border-color .2s; }
.ticks .dot svg { width: 14px; height: 14px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: scale(.6); transition: opacity .2s, transform .25s var(--e-out); }
.ticks li.active { color: var(--ink); }
.ticks li.active .dot { border-color: var(--acc-100); border-top-color: var(--acc); animation: spin .9s linear infinite; }
.ticks li.done { color: var(--ink); }
.ticks li.done .dot { background: var(--green); border-color: var(--green); }
.ticks li.done .dot svg { opacity: 1; transform: none; }
.loader-err { margin-top: 20px; }
.loader-err-text { font-weight: 600; }
.loader.failed .orbit::before, .loader.failed .orbit::after { animation: none; }
.loader.failed .ticks { display: none; }

/* favicon tiles (letter tile fallback) */
.fav { flex: none; display: grid; place-items: center; width: 36px; height: 36px; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 10px; color: var(--acc); font: 700 15px/1 'Inter Tight', sans-serif; }
.fav img { width: 20px; height: 20px; }
.fav.letter { background: var(--acc-50); border-color: var(--acc-100); }
.fav-lg { width: 48px; height: 48px; border-radius: 12px; font-size: 20px; }
.fav-lg img { width: 28px; height: 28px; }
.fav-xl { width: 56px; height: 56px; border-radius: 16px; font-size: 24px; }
.fav-xl img { width: 32px; height: 32px; }

/* step 5 · results */
.results { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; padding-bottom: 0; }
.results > .h1 { margin: 4px 0 6px; }
.site-card { padding: 18px 20px 20px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; background: var(--green-50); color: var(--green-d); border-radius: 8px; font-size: 14px; font-weight: 500; }
.badge svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.site-row { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.site-text { min-width: 0; flex: 1; }
.site-title { font-size: 16.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-domain { color: var(--mute); font-size: 15px; }
.dash { border: 0; border-top: 1px dashed var(--line); margin: 16px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 12px; background: var(--panel); border-radius: 10px; font-size: 14.5px; font-weight: 500; }
.chip img.flag { width: 22px; height: 16px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(15, 23, 41, .06); }
.chip img.plat { width: 18px; height: 18px; border-radius: 4px; }
.chip .plat-dot { width: 18px; height: 18px; border-radius: 5px; background: var(--acc-100); }
.strip { background: var(--acc-50); border: 1px solid var(--acc-100); border-radius: var(--r); padding: 16px 20px; color: var(--mute); font-size: 16px; }
.strip strong { color: var(--acc); font-weight: 600; }
.rows { list-style: none; padding: 0; display: grid; gap: 8px; }
.row { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 11px 12px; background: #F8F9FA; border-radius: var(--r-sm); }
.row-text { min-width: 0; }
.row-name { font-size: 16px; line-height: 1.3; overflow-wrap: anywhere; }
.row-sub { color: var(--mute); font-size: 12.5px; margin-top: 2px; }
.boost { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.boost-label { font-size: 16px; }
.boost-num { display: flex; align-items: center; gap: 8px; margin-top: 2px; color: var(--green); font: 700 23px/1.25 'Inter Tight', sans-serif; letter-spacing: -.02em; }
.boost-num svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.boost-sub { color: var(--mute); font-size: 16px; }
.boost-art { width: 78px; height: auto; flex: none; }
.boost-art rect { fill: var(--acc-100); }
.boost-art rect:last-child { fill: var(--acc); opacity: .85; }
.idea-name { font-size: 16px; line-height: 1.35; }
.brand-sum { font-size: 16px; line-height: 1.55; }
.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.more p { font-size: 15.5px; line-height: 1.55; }
.themes { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.themes li { padding: 6px 12px; background: var(--acc-50); color: var(--acc); border-radius: 999px; font-size: 13.5px; line-height: 1.35; }
.link-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-top: 4px; padding: 0; background: none; border: 0; color: var(--acc); font: 500 15px 'Inter', sans-serif; cursor: pointer; }
.link-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.link-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.results .sticky { margin-top: 0; }
/* L2: long AI words wrap instead of pushing the page sideways */
.idea-name, .brand-sum, #r-aud, #r-tone, .themes li, .row-name, .row-sub, .site-domain, .loader-domain { overflow-wrap: anywhere; }
.themes li { max-width: 100%; }
/* F2: quiet "Scan another website" link */
.again { text-align: center; }
.field-hint { margin-top: 8px; color: var(--mute); font-size: 14.5px; }
.field-hint .link-btn { display: inline; min-height: 0; margin: 0; font-size: 14.5px; text-decoration: underline; }
.link-btn.quiet { color: var(--mute); font-weight: 400; text-decoration: underline; text-underline-offset: 3px; }

/* next.html placeholder */
.placeholder { text-align: center; }
.placeholder .card { margin-top: 22px; color: var(--mute); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 var(--acc-glow); } 70% { box-shadow: 0 0 0 16px rgba(0, 0, 0, 0); } 100% { box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); } }

@media (min-width: 768px) {
  .h1 { font-size: 36px; }
  .h1-sm { font-size: 30px; }
  .screen.center { padding-bottom: 14vh; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .001ms !important; }
  .m-scan { display: none; }
}
.progress-full { width: 100%; }
