/* Signup wizard popup (public/js/signup-wizard.js). Uses the tokens from styles.css. */
.sw-backdrop { position: fixed; inset: 0; z-index: 110; display: grid; place-items: center; padding: 16px;
  background: rgba(8, 24, 28, .6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity .2s; }
.sw-backdrop.show { opacity: 1; }
.sw-backdrop[hidden] { display: none; }
.sw-dialog { width: min(900px, 100%); height: min(760px, calc(100dvh - 32px)); display: flex; flex-direction: column; background: var(--surface);
  color: var(--text); border: 1px solid var(--border); border-radius: 22px; box-shadow: 0 40px 100px -30px rgba(8, 30, 34, .55); overflow: hidden;
  transform: translateY(12px) scale(.985); transition: transform .25s cubic-bezier(.2, .8, .2, 1); }
.sw-backdrop.show .sw-dialog { transform: none; }
.sw-top { display: flex; align-items: center; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.sw-top .logo { font-size: 20px; flex: none; }
.sw-steps { list-style: none; display: flex; gap: 6px; margin: 0 auto; padding: 0; overflow-x: auto; }
.sw-steps li { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); white-space: nowrap; padding: 4px 8px; border-radius: 999px; }
.sw-steps li span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--surface-2); flex: none; }
.sw-steps li span svg { width: 13px; height: 13px; }
.sw-steps li em { font-style: normal; }
.sw-steps li.current { color: var(--text); font-weight: 600; background: var(--brand-soft); }
.sw-steps li.current span { background: var(--brand); color: #fff; }
.sw-steps li.done span { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.sw-close { width: 36px; height: 36px; border-radius: 10px; border: 0; background: none; color: var(--muted); font-size: 24px; cursor: pointer; flex: none; }
.sw-close:hover { background: var(--surface-2); color: var(--text); }
.sw-progress { height: 3px; background: var(--surface-2); }
.sw-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width .4s ease; }
.sw-body { flex: 1; overflow-y: auto; padding: 26px 30px; }
.sw-foot { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--border); background: var(--surface); }
.sw-foot[hidden] { display: none; }
.sw-where { flex: 1; text-align: center; color: var(--muted); font-size: 13px; }
.sw-next { min-width: 160px; justify-content: center; }
.sw-center { max-width: 560px; margin: 4vh auto 0; text-align: center; }
.sw-center h2, .sw-center-head h2 { font-size: clamp(22px, 3vw, 28px); letter-spacing: -0.02em; margin: 0 0 6px; }
.sw-center-head { text-align: center; margin-bottom: 18px; }
.sw-h { margin: 0 0 4px; }
h2.sw-h { font-size: 24px; letter-spacing: -0.02em; }
p.sw-h { margin-bottom: 18px; }
.sw-urlform { text-align: start; margin-top: 22px; }
.sw-url { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 14px; padding: 4px 6px 4px 12px; background: var(--surface); }
.sw-url:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.sw-url span { color: var(--muted); display: grid; }
.sw-url input { border: 0; background: transparent; font-size: 17px; padding: 12px 4px; }
.sw-url input:focus { outline: none; }
.sw-hint { font-size: 13px; margin: 8px 0 0; }
.sw-wide { width: 100%; justify-content: center; margin-top: 16px; }
.sw-assure { list-style: none; padding: 0; margin: 14px 0 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: 13px; }
.sw-assure li { display: flex; gap: 5px; align-items: center; }
.sw-assure svg, .sw-okchip svg, .sw-note svg, .sw-next-box svg, .sw-plan li svg { color: var(--ok); width: 15px; height: 15px; flex: none; }
.sw-err { color: var(--bad); font-size: 14px; margin: 10px 0 0; }
.sw-err[hidden] { display: none; }
.sw-pulse { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 16px; display: grid; place-items: center; color: var(--brand); background: var(--brand-soft); animation: swPulse 1.6s ease-in-out infinite; }
.sw-pulse svg { width: 30px; height: 30px; }
@keyframes swPulse { 50% { box-shadow: 0 0 0 14px color-mix(in srgb, var(--brand) 10%, transparent); } }
.sw-stages { text-align: start; margin: 22px auto 0; max-width: 420px; display: grid; gap: 10px; }
.sw-stage { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 15px; }
.sw-stage.done { color: var(--text); }
.sw-stage .ok { color: var(--ok); display: grid; }
.sw-stage .todo { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border); }
.sw-summary { display: grid; grid-template-columns: 180px 1fr; gap: 28px; align-items: center; max-width: 720px; margin: 3vh auto 0; }
.sw-ring { --p: 0; --c: var(--brand); width: 160px; height: 160px; border-radius: 50%; display: grid; place-items: center; align-content: center; position: relative;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--surface-2) 0); }
.sw-ring::after { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: var(--surface); }
.sw-ring b, .sw-ring span { position: relative; z-index: 1; display: block; text-align: center; }
.sw-ring b { font-size: 44px; font-weight: 800; line-height: 1; }
.sw-ring span { color: var(--muted); font-size: 13px; }
.sw-issues { padding-inline-start: 18px; margin: 6px 0 12px; }
.sw-sec { border: 1px solid var(--border); border-radius: 16px; padding: 18px; margin-bottom: 14px; }
.sw-sec h3 { font-size: 15px; margin: 0 0 4px; display: flex; align-items: center; gap: 8px; }
.sw-sec h3::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--c, var(--brand)); }
.sw-sec.blue { --c: #3b82f6; background: color-mix(in srgb, #3b82f6 5%, var(--surface)); }
.sw-sec.green { --c: #10b981; background: color-mix(in srgb, #10b981 5%, var(--surface)); }
.sw-sec.purple { --c: #8b5cf6; background: color-mix(in srgb, #8b5cf6 5%, var(--surface)); }
.sw-sec.red { --c: #ef4444; background: color-mix(in srgb, #ef4444 4%, var(--surface)); }
.sw-sec p.muted { font-size: 13px; margin: 0 0 10px; }
.sw-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; }
.sw-grid .span2 { grid-column: 1 / -1; }
.sw-form label, .sw-label { display: block; font-weight: 600; font-size: 14px; margin: 10px 0 6px; }
.sw-okchip { display: inline-flex; align-items: center; gap: 4px; color: var(--ok); font-size: 12px; font-weight: 600; margin-top: 6px; }
.sw-form .sw-radio { display: flex; align-items: center; gap: 8px; font-weight: 500; border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px; margin: 0 0 6px; cursor: pointer; background: var(--surface); }
.sw-radio input { width: auto; margin: 0; }
.sw-radio:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.sw-cities[hidden] { display: none; }
.sw-cities small { display: block; margin-top: 4px; font-size: 12px; }
.sw-count { text-align: end; font-size: 12px; color: var(--muted); margin-top: 4px; }
.sw-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.sw-list:empty::before { content: attr(data-empty); color: var(--muted); font-size: 14px; padding: 8px 0; }
.sw-item { display: flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 4px 6px 4px 8px; }
.sw-item.dragging { opacity: .5; border-style: dashed; }
.sw-item .grip { color: var(--muted); cursor: grab; display: grid; }
.sw-item input { border: 0; background: transparent; padding: 8px 4px; font-weight: 500; }
.sw-item input:focus { outline: 2px solid var(--brand); outline-offset: 0; border-radius: 6px; }
.ib { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border: 0; background: none; color: var(--muted); border-radius: 8px; cursor: pointer; }
.ib:hover { background: var(--surface-2); color: var(--text); }
.ib.del:hover { color: var(--bad); }
.sw-rank-top, .sw-rank-bot { font-size: 12px; font-weight: 600; color: var(--ok); margin: 4px 0; }
.sw-rank-bot { color: var(--muted); }
.sw-add { display: flex; gap: 8px; margin-top: 8px; }
.sw-add input { flex: 1; }
.sw-how { display: grid; gap: 12px; margin-top: 8px; }
.sw-how-item { display: flex; gap: 14px; border: 1px solid var(--border); border-radius: 16px; padding: 16px; }
.sw-how-item .n { width: 36px; height: 36px; flex: none; border-radius: 10px; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--brand-2), var(--brand-dark)); }
.sw-how-item h3 { margin: 0 0 4px; font-size: 16px; }
.sw-how-item p { margin: 0 0 8px; color: var(--muted); font-size: 14px; }
.sw-note { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: 14px; margin-top: 16px; }
.sw-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.sw-stats div { border: 1px solid var(--border); border-radius: 14px; padding: 12px; }
.sw-stats div.hl { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 30%, var(--border)); }
.sw-stats span { display: block; font-size: 12px; color: var(--muted); }
.sw-stats b { font-size: 22px; }
.sw-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; }
.sw-table td, .sw-table th { white-space: nowrap; }
.sw-table tr.you td { background: var(--brand-soft); font-weight: 600; }
.sw-fav { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; background: var(--surface-2); font-size: 11px; font-weight: 700; margin-inline-end: 4px; }
.sw-empty { text-align: center; color: var(--muted); border: 1px dashed var(--border); border-radius: 14px; padding: 22px; }
.sw-addcomp { margin-top: 16px; }
.sw-addcomp label { font-weight: 600; font-size: 14px; }
.sw-addcomp small { display: block; margin-top: 6px; font-size: 12px; }
.sw-small { font-size: 12px; margin-top: 12px; }
.sw-account { max-width: 440px; margin: 0 auto; }
.sw-account h2 { margin: 0 0 6px; text-align: center; }
.sw-account > p.muted { text-align: center; }
.sw-switch { text-align: center; font-size: 14px; color: var(--muted); }
.sw-next-box { margin-top: 16px; border-radius: 14px; padding: 14px 16px; background: color-mix(in srgb, var(--ok) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--ok) 25%, var(--border)); font-size: 14px; }
.sw-next-box ul { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.sw-next-box li { display: flex; gap: 8px; align-items: flex-start; }
.sw-interval { margin-top: 12px; }
.sw-interval button[aria-checked="true"] { background: var(--surface); color: var(--text); box-shadow: 0 2px 8px -2px rgba(0, 0, 0, .18); }
.sw-plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.sw-plan { position: relative; display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--border); border-radius: 16px; padding: 16px; cursor: pointer; margin: 0; font-weight: 400; }
.sw-plan input { position: absolute; opacity: 0; pointer-events: none; }
.sw-plan:has(input:checked) { border: 2px solid var(--brand); background: var(--brand-soft); padding: 15px; }
.sw-plan:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.sw-plan.pop .badge { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 700; color: #fff; padding: 3px 10px; border-radius: 999px; background: var(--accent); white-space: nowrap; }
.sw-plan b { font-size: 16px; }
.sw-plan .price { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.sw-plan .price small { font-size: 13px; color: var(--muted); font-weight: 500; }
.sw-plan ul { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 6px; font-size: 13px; }
.sw-plan li { display: flex; gap: 6px; align-items: flex-start; }
@media (max-width: 760px) {
  .sw-backdrop { padding: 0; }
  .sw-dialog { height: 100dvh; border-radius: 0; }
  .sw-steps li em { display: none; }
  .sw-steps li.current em { display: inline; }
  .sw-body { padding: 20px 16px; }
  .sw-grid, .sw-summary { grid-template-columns: 1fr; }
  .sw-summary { text-align: center; justify-items: center; }
  .sw-stats { grid-template-columns: 1fr 1fr; }
  .sw-plans { grid-template-columns: 1fr 1fr; }
  .sw-where { display: none; }
  .sw-next { min-width: 0; flex: 1; }
}
@media (max-width: 420px) { .sw-plans { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .sw-backdrop, .sw-dialog, .sw-progress i { transition: none; } .sw-pulse { animation: none; } }
.sw-summary .sw-issues { text-align: start; }
.sw-body { overflow-x: hidden; }
.sw-plan, .sw-grid > div { min-width: 0; }

/* ---- Analysis result (step 1): overall ring, three scores, opportunities, brand signals ---- */
.sw-sum { max-width: 840px; margin: 0 auto; }
.sw-sum-head { display: grid; grid-template-columns: 150px 1fr; gap: 24px; align-items: center; margin-bottom: 18px; }
.sw-sum-head .sw-ring { width: 140px; height: 140px; }
.sw-sum-main h2 { font-size: clamp(20px, 2.6vw, 26px); margin: 0 0 4px; letter-spacing: -0.02em; }
.sw-facts { margin: 0 0 12px; font-size: 14px; }
.sw-bars { display: grid; gap: 8px; }
.sw-bar { display: grid; grid-template-columns: 120px 1fr 34px; gap: 10px; align-items: center; font-size: 13px; }
.sw-bar .track, .sw-rival .track { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.sw-bar .track i, .sw-rival .track i { display: block; height: 100%; border-radius: inherit; }
.sw-bar b, .sw-dim b, .sw-rival .power b { text-align: end; font-variant-numeric: tabular-nums; }
.sw-sum-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 14px; }
.sw-card { border: 1px solid var(--border); border-radius: 16px; padding: 16px; background: var(--surface); min-width: 0; }
.sw-card h3 { margin: 0 0 8px; font-size: 15px; }
.sw-card > p.muted { font-size: 13px; margin: -2px 0 10px; }
.sw-opps { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.sw-opps li { display: flex; gap: 10px; align-items: flex-start; }
.sw-opps .dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; flex: none; background: var(--warn); }
.sw-opps li.high .dot { background: var(--bad); }
.sw-opps li.low .dot { background: var(--muted); }
.sw-opps b { font-size: 14px; display: block; }
.sw-opps p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.sw-signals { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; font-size: 13px; }
.sw-signals li { display: flex; gap: 8px; align-items: center; cursor: help; }
.sw-signals li svg { width: 15px; height: 15px; flex: none; }
.sw-signals li.ok svg { color: var(--ok); }
.sw-signals li.no { color: var(--muted); }
.sw-signals li.no svg { color: var(--bad); }
.sw-found { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 14px; font-size: 13px; }
.sw-found > span:first-child { color: var(--muted); margin-inline-end: 4px; }
.sw-tag { display: inline-flex; gap: 6px; align-items: center; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border);
  font-size: 12px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sw-tag > span { color: var(--brand); }
.sw-next-hint { text-align: center; margin-top: 16px; font-size: 14px; }

/* ---- Business and offer steps ---- */
.sw-sec.orange { --c: var(--accent); background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.sw-sec.teal { --c: var(--brand-2); background: color-mix(in srgb, var(--brand-2) 6%, var(--surface)); }
.sw-sec textarea + .sw-label { margin-top: 12px; }
.sw-verify { font-size: 11px; font-weight: 700; color: var(--warn); background: color-mix(in srgb, var(--warn) 13%, transparent); border-radius: 999px;
  padding: 2px 8px; margin-inline-start: 6px; cursor: help; vertical-align: 1px; }
.sw-cov { display: inline-flex; align-items: center; gap: 4px; flex: none; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; text-decoration: none; }
.sw-cov svg { width: 12px; height: 12px; }
.sw-cov.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.sw-cov.no { color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, transparent); cursor: help; }
.sw-covsum { font-size: 13px; margin: -4px 0 10px; color: var(--muted); }
.sw-suggest { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 12px; font-size: 13px; }
.sw-suggest > span { color: var(--muted); margin-inline-end: 4px; }
.sw-chip { border: 1px dashed color-mix(in srgb, var(--brand) 45%, var(--border)); background: var(--surface); color: var(--brand-dark); border-radius: 999px;
  padding: 5px 11px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.sw-chip:hover { background: var(--brand-soft); border-style: solid; }
.sw-insight { border-radius: 16px; padding: 16px 18px; margin-bottom: 14px; border: 1px solid color-mix(in srgb, var(--brand) 20%, var(--border));
  background: linear-gradient(135deg, var(--brand-soft), color-mix(in srgb, var(--accent) 7%, var(--surface))); }
.sw-insight h3 { margin: 0 0 10px; font-size: 15px; display: flex; gap: 6px; align-items: center; }
.sw-insight h3 svg { color: var(--accent); }
.sw-insight p { margin: 10px 0 0; font-size: 13px; }
.sw-qs { display: flex; flex-wrap: wrap; gap: 6px; }
.sw-q { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 6px 10px; font-size: 13px; font-weight: 600; }
.sw-q::before { content: "⌕ "; color: var(--muted); }

/* ---- Competitor analysis ---- */
.sw-stats em { display: block; font-style: normal; font-size: 12px; color: var(--muted); margin-top: 2px; }
.sw-stats b small { font-size: 13px; color: var(--muted); font-weight: 600; }
.sw-comp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.sw-comp-grid:empty { display: none; }
.sw-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.sw-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 5px; vertical-align: -1px; background: var(--c); }
.sw-legend .you, .sw-dim .you { --c: var(--accent); }
.sw-legend .med, .sw-dim .med { --c: color-mix(in srgb, var(--muted) 50%, transparent); }
.sw-legend .best, .sw-dim .best { --c: var(--brand); }
.sw-dim { display: grid; grid-template-columns: 96px 1fr 30px; gap: 10px; align-items: center; font-size: 13px; margin-top: 10px; }
.sw-dim .bars { display: grid; gap: 3px; }
.sw-dim .bars i { display: block; height: 6px; border-radius: 99px; background: var(--c); min-width: 3px; }
.sw-moves { margin: 0; padding-inline-start: 20px; display: grid; gap: 10px; }
.sw-moves li::marker { font-weight: 800; color: var(--accent); }
.sw-moves b { font-size: 14px; }
.sw-moves p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.sw-rivals { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.sw-rival { display: grid; grid-template-columns: 24px minmax(0, 1fr) 130px 30px; gap: 12px; align-items: center; border: 1px solid var(--border); border-radius: 14px;
  padding: 12px; background: var(--surface); }
.sw-rival.you { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 30%, var(--border)); }
.sw-rival .rk { font-weight: 800; color: var(--muted); text-align: center; }
.sw-rival .top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sw-rival .top b { overflow-wrap: anywhere; }
.sw-rival .facts { font-size: 12px; color: var(--muted); margin-top: 3px; }
.sw-rival .why { font-size: 12px; margin-top: 3px; font-style: italic; color: var(--muted); }
.sw-rival .chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.sw-pro, .sw-con { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 8px; }
.sw-pro { color: var(--ok); background: color-mix(in srgb, var(--ok) 11%, transparent); }
.sw-con { color: var(--bad); background: color-mix(in srgb, var(--bad) 9%, transparent); }
.sw-rival .power { display: grid; grid-template-columns: 1fr 30px; gap: 8px; align-items: center; }
.sw-rival .power i { background: var(--brand); }
.sw-rival.you .power i { background: var(--accent); }
.sw-gaps-card { margin-bottom: 14px; }
.sw-gaps { display: flex; flex-wrap: wrap; gap: 6px; }
.sw-gap { display: inline-flex; align-items: center; gap: 6px; border-radius: 10px; padding: 6px 10px; background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--border)); font-size: 13px; font-weight: 600; cursor: help; }
.sw-gap em { font-style: normal; font-size: 11px; font-weight: 800; color: var(--accent-dark); }
@media (max-width: 760px) {
  .sw-sum-head, .sw-sum-grid, .sw-comp-grid { grid-template-columns: 1fr; }
  .sw-sum-head { justify-items: center; text-align: center; }
  .sw-sum-main { width: 100%; }
  .sw-bar { grid-template-columns: 96px 1fr 30px; text-align: start; }
  .sw-rival { grid-template-columns: 22px minmax(0, 1fr) 30px; }
  .sw-rival .power { grid-column: 2; }
}
