/* ------------------------------------------------------------------ *
 * Cedar City Marketing: the rank scan at /where-do-i-rank.
 *
 * Same tool as theatlasagency.ai/scan, same markup, same JavaScript.
 * This file is the whole difference: Cedar City's palette, Manrope and
 * DM Sans in place of Unbounded and Space Grotesk, and page chrome that
 * matches /get-ranked rather than the Atlas site.
 *
 * Derived from sites/atlas-agency/assets/scan.css. It is NOT synced by
 * tools/sync-scan-engine.mjs, because the two sites are supposed to
 * look different. When a component is added to the Atlas stylesheet,
 * port it here by hand.
 *
 * Shadows are neutral and used for elevation only. No coloured glow
 * anywhere, including behind the submit button and the form card.
 * ------------------------------------------------------------------ */

:root{
  /* Cedar City Marketing, the same values every other page uses. */
  --red:      #B63D2B;
  --red-dk:   #8f2e1e;
  --red-lt:   #d4503b;
  --canyon:   #1F2A30;
  --canyon-dk:#161E23;
  --sand:     #F2F4F5;
  --sand-dk:  #E1E5E8;
  --paper:    #F8F9FA;
  --white:    #FFFFFF;

  /* ---- the bridge -------------------------------------------------
   * The scan components below were written against the Atlas token
   * names. Rather than rename them in 600 lines of CSS and lose the
   * ability to diff the two stylesheets, the names stay and the values
   * become Cedar City's. RGB triplets, so they still compose with
   * alpha the way the components expect.
   *
   * --primary is structure here, not accent: borders, hairlines, focus
   * rings. Canyon reads as a quiet line at low alpha where a red one
   * would shout. The genuinely accented pieces are pulled back to red
   * at the bottom of this file.
   * ----------------------------------------------------------------- */
  --primary: 31, 42, 48;         /* canyon */
  --secondary: 182, 61, 43;      /* red */
  --void: 244, 237, 228;         /* sand, the page behind the panels */
  --surface: 255, 255, 255;      /* panels */
  --ink: 31, 42, 48;
  --ink-soft: 61, 74, 82;
  --hi: 255, 255, 255;
  --card-grad: linear-gradient(168deg, #FFFFFF 0%, #FDFAF7 100%);

  /* The suggestion dropdown is a white card on this site, not the dark
     one the Atlas nav uses. */
  --menu-card: 255, 255, 255;
  --menu-ink: 31, 42, 48;
  --menu-ink-soft: 61, 74, 82;
  --menu-primary: 182, 61, 43;

  /* ---- the rank scale ---------------------------------------------
   * This is data, not decoration, so it keeps the traffic-light
   * reading that every map tool uses. The one change from Atlas is the
   * bottom band: a plain red there would be within a few degrees of
   * the brand red on the call-to-action button, and a visitor should
   * never have to work out whether a red thing means "bad ranking" or
   * "press me". Wine instead, which no button on this site uses.
   * ----------------------------------------------------------------- */
  --rank-top:  26, 138, 92;      /* 1 to 3   */
  --rank-mid: 200, 134, 26;      /* 4 to 10  */
  --rank-low: 140, 47, 61;       /* 11 to 20 */
  --rank-none: 138, 129, 120;    /* not found, warm grey off the sand */

  /* Elevation only, neutral canyon tint, matching /get-ranked. */
  --lift-1: 0 1px 2px rgba(31,42,48,.05), 0 4px 14px rgba(31,42,48,.05);
  --lift-2: 0 2px 4px rgba(31,42,48,.05), 0 10px 30px rgba(31,42,48,.08);
  --lift-3: 0 4px 10px rgba(31,42,48,.07), 0 22px 50px rgba(31,42,48,.12);
  --lift-btn: 0 2px 5px rgba(31,42,48,.16), 0 8px 20px rgba(31,42,48,.18);
  --lift-btn-hi: 0 3px 8px rgba(31,42,48,.2), 0 14px 30px rgba(31,42,48,.24);
  --panel-shadow: var(--lift-2);
  --panel-shadow-lift: var(--lift-3);

  /* Spacing, in the names the components use. */
  --s-2: .5rem;
  --s-3: .75rem;
  --s-4: 1rem;
  --s-6: 1.5rem;
  --s-8: 2rem;
  --s-12: 3rem;

  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}

/* ------------------------------------------------------------------ */
/* Page base and chrome                                                */
/* ------------------------------------------------------------------ */
*, *::before, *::after{ box-sizing: border-box; }
html{ -webkit-text-size-adjust: 100%; }
body{
  margin: 0;
  background: var(--white);
  color: var(--canyon);
  font-family: 'DM Sans', ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4{ font-family: 'Manrope', sans-serif; }
img{ max-width: 100%; }

.ic{ display: inline-block; width: 1rem; height: 1rem; flex: none; }

/* The Atlas pages get this from Tailwind's preflight, which this site
   does not load. Without it, hiding a panel with the hidden attribute
   does nothing to anything the stylesheet gives a display value to, so
   the "Loading your scan" card sits above the finished results. */
[hidden]{ display: none !important; }

.skip{
  position: absolute; left: -9999px; top: 0;
  padding: .7rem 1.1rem;
  background: var(--canyon); color: #fff;
  font-family: 'Manrope', sans-serif; font-weight: 700; font-size: .85rem;
  border-radius: 0 0 8px 0; text-decoration: none; z-index: 999;
}
.skip:focus{ left: 0; }

/* Header: logo and the campaign phone number, nothing else. The page is
   paid traffic, so the only ways on from here are the form and a call. */
.lp-head{
  position: sticky; top: 0; z-index: 100;
  background: var(--canyon);
  border-bottom: 1px solid rgba(242,244,245,.09);
}
.lp-head-in{
  max-width: 1080px; margin: 0 auto;
  padding: .7rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.lp-logo{ display: block; flex: none; }
.lp-logo img{ display: block; height: 52px; width: auto; }
.head-call{
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .45rem 1rem .5rem;
  border: 1.5px solid rgba(242,244,245,.3); border-radius: 9px;
  color: var(--sand); text-decoration: none; white-space: nowrap;
  font-family: 'Manrope', sans-serif;
  transition: background .2s ease, border-color .2s ease, transform .18s var(--ease-spring);
}
.head-call:hover{ background: rgba(242,244,245,.1); border-color: rgba(242,244,245,.6); transform: translateY(-1px); }
.head-call:active{ transform: translateY(0); background: rgba(242,244,245,.16); }
.head-call:focus-visible{ outline: 2px solid var(--sand); outline-offset: 3px; }
.head-call svg{ flex: none; opacity: .75; }
.head-call-text{ display: flex; flex-direction: column; line-height: 1.14; text-align: left; }
.head-call-lab{ font-size: .6rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: rgba(242,244,245,.6); }
.head-call-num{ font-size: 1rem; font-weight: 800; letter-spacing: -.01em; }
@media (max-width: 560px){
  .lp-head-in{ padding: .55rem 1rem; }
  .lp-logo img{ height: 40px; }
  .head-call{ padding: .4rem .7rem; }
  .head-call-num{ font-size: .9rem; }
}

.lp-foot{
  padding: var(--s-8) 1.25rem 2.5rem;
  background: var(--canyon);
  color: rgba(242,244,245,.62);
  text-align: center;
  font-size: .82rem;
  line-height: 1.7;
}
.lp-foot img{ height: 56px; width: auto; margin-bottom: .75rem; }
.lp-foot p{ margin: 0; }
.lp-foot a{ color: rgba(242,244,245,.82); }
.lp-foot .fnum{ font-family: 'Manrope', sans-serif; font-weight: 800; font-size: 1.05rem; color: var(--sand); text-decoration: none; }
.lp-foot .fnum:hover{ color: #fff; }

/* Buttons. Red is the money button, canyon is the quiet one, and both
   carry a neutral drop shadow rather than a tinted halo. */
.btn{
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: 1.05rem 2rem;
  font-family: 'Manrope', sans-serif; font-weight: 800; font-size: 1rem;
  border: none; border-radius: 10px;
  text-decoration: none; cursor: pointer;
  transition: background-color .2s ease, transform .18s var(--ease-spring), box-shadow .2s ease;
}
.btn-primary{ background: var(--red); color: #fff; box-shadow: var(--lift-btn); }
.btn-primary:hover{ background: var(--red-lt); transform: translateY(-2px); box-shadow: var(--lift-btn-hi); }
.btn-primary:active{ transform: translateY(0); box-shadow: var(--lift-btn); }
.btn-primary:focus-visible{ outline: 2px solid var(--canyon); outline-offset: 3px; }
.btn-ghost{
  background: var(--white); color: var(--canyon);
  border: 1.5px solid rgba(31,42,48,.18);
  box-shadow: var(--lift-1);
}
.btn-ghost:hover{ border-color: rgba(31,42,48,.4); transform: translateY(-2px); box-shadow: var(--lift-2); }
.btn-ghost:active{ transform: translateY(0); box-shadow: var(--lift-1); }
.btn-ghost:focus-visible{ outline: 2px solid var(--red); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce){
  .btn, .head-call, .scan-mini, .scan-pin{ transition: none; }
}

/* ------------------------------------------------------------------ */
/* Shared                                                              */
/* ------------------------------------------------------------------ */
.scan-wrap{ width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 var(--s-6); }
.scan-narrow{ max-width: 58rem; }

.scan-panel{
  position: relative;
  border: 1px solid rgba(var(--primary), .2);
  border-radius: 20px;
  background-image: var(--card-grad);
  box-shadow: var(--panel-shadow);
}

.scan-h2{
  margin: 0;
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: clamp(1.375rem, 2.6vw, 1.875rem);
  line-height: 1.16;
  letter-spacing: -0.03em;
  color: rgb(var(--ink));
  text-wrap: balance;
}
.scan-sub{
  margin: var(--s-3) 0 0;
  font-size: .9375rem;
  line-height: 1.7;
  color: rgba(var(--ink-soft), .7);
  text-wrap: pretty;
}
.scan-mono{
  font-family: 'DM Sans', ui-sans-serif, sans-serif;
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------ */
/* Form page                                                           */
/* ------------------------------------------------------------------ */
.scan-hero{
  position: relative;
  overflow-x: clip;
  padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(3rem, 6vw, 5rem);
}
.scan-hero-inner{
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: start;
}
@media (min-width: 62rem){
  .scan-hero-inner{ grid-template-columns: minmax(0, 1fr) minmax(0, 27rem); gap: clamp(3rem, 5vw, 5rem); }
}

.scan-title{
  margin: 0;
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: clamp(2rem, 4.4vw, 3.25rem);
  line-height: 1.07;
  letter-spacing: -0.03em;
  color: rgb(var(--ink));
  text-wrap: balance;
}
.scan-lede{
  margin: var(--s-6) 0 0;
  max-width: 34rem;
  font-size: clamp(1rem, 1.3vw, 1.125rem);
  line-height: 1.75;
  color: rgba(var(--ink-soft), .74);
  text-wrap: pretty;
}

.scan-points{ margin: var(--s-8) 0 0; padding: 0; list-style: none; display: grid; gap: var(--s-4); max-width: 32rem; }
.scan-points li{
  display: grid;
  grid-template-columns: 1.5rem 1fr;
  gap: var(--s-3);
  font-size: .9375rem;
  line-height: 1.65;
  color: rgba(var(--ink-soft), .76);
}
.scan-points .ic{ width: 1.125rem; height: 1.125rem; margin-top: .2rem; color: rgba(var(--primary), .95); }

/* The little preview grid under the copy: a hint of the output. */
.scan-preview{ margin: clamp(2rem, 4vw, 3rem) 0 0; display: flex; align-items: center; gap: var(--s-6); flex-wrap: wrap; }
.scan-preview-grid{
  display: grid;
  gap: 6px;
  width: 11.5rem;
  padding: var(--s-3);
  border: 1px solid rgba(var(--primary), .18);
  border-radius: 14px;
  background: rgba(var(--surface), .5);
}
.scan-preview-dot{
  aspect-ratio: 1;
  border-radius: 999px;
  opacity: .85;
  animation: scan-dot-in .5s var(--ease-spring) both;
}
@keyframes scan-dot-in{ from{ opacity: 0; transform: scale(.4); } to{ opacity: .85; transform: scale(1); } }
@media (prefers-reduced-motion: reduce){ .scan-preview-dot{ animation: none; } }
.scan-preview-note{ max-width: 15rem; margin: 0; font-size: .8125rem; line-height: 1.65; color: rgba(var(--ink-soft), .6); }

/* ---- the form card ---------------------------------------------- */
.scan-card{ padding: clamp(1.5rem, 3vw, 2.25rem); }
.scan-card-head{ margin: 0 0 var(--s-6); }
.scan-card-title{
  margin: 0;
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: 1.1875rem;
  letter-spacing: -0.02em;
  color: rgb(var(--ink));
}
.scan-card-note{ margin: var(--s-2) 0 0; font-size: .8125rem; line-height: 1.6; color: rgba(var(--ink-soft), .62); }

.scan-fields{ display: grid; gap: var(--s-4); }
.scan-row{ display: grid; gap: var(--s-4); }
@media (min-width: 30rem){ .scan-row{ grid-template-columns: 1fr 1fr; } }

.scan-field{ display: grid; gap: .4375rem; position: relative; }
.scan-label{
  font-size: .8125rem;
  font-weight: 500;
  color: rgba(var(--ink-soft), .82);
}
.scan-label .scan-opt{ color: rgba(var(--ink-soft), .45); font-weight: 400; }
.scan-hint{ font-size: .75rem; line-height: 1.55; color: rgba(var(--ink-soft), .52); }

.scan-input{
  width: 100%;
  padding: .75rem .875rem;
  font: inherit;
  font-size: .9375rem;
  color: rgb(var(--ink));
  background: rgba(var(--void), .55);
  border: 1px solid rgba(var(--primary), .26);
  border-radius: 11px;
  outline: none;
  transition: border-color .18s ease, background-color .18s ease;
}
.scan-input::placeholder{ color: rgba(var(--ink-soft), .38); }
.scan-input:hover{ border-color: rgba(var(--primary), .4); }
.scan-input:focus-visible{
  border-color: rgba(var(--primary), .85);
  outline: 2px solid rgba(var(--primary), .85);
  outline-offset: 1px;
}
.scan-input[aria-invalid="true"]{ border-color: rgba(var(--rank-low), .8); }

/* ---- business autocomplete -------------------------------------- */
.scan-combo{ position: relative; }
.scan-combo-status{
  position: absolute;
  top: 50%;
  right: .75rem;
  transform: translateY(-50%);
  display: none;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(var(--primary), .3);
  border-top-color: rgba(var(--primary), .95);
  border-radius: 999px;
  animation: scan-spin .7s linear infinite;
}
.scan-combo[data-busy="true"] .scan-combo-status{ display: block; }
@keyframes scan-spin{ to{ transform: translateY(-50%) rotate(360deg); } }

.scan-suggestions{
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  margin: 0;
  padding: .3125rem;
  list-style: none;
  max-height: 17rem;
  overflow-y: auto;
  border: 1px solid rgba(var(--primary), .28);
  border-radius: 13px;
  background: rgb(var(--menu-card));
  box-shadow: var(--panel-shadow-lift);
}
.scan-suggestions[hidden]{ display: none; }
.scan-suggestion{
  display: grid;
  gap: 2px;
  padding: .5rem .625rem;
  border-radius: 9px;
  cursor: pointer;
  transition: background-color .14s ease;
}
.scan-suggestion:hover,
.scan-suggestion[aria-selected="true"]{ background: rgba(var(--menu-primary), .16); }
.scan-suggestion-main{ font-size: .875rem; font-weight: 500; color: rgb(var(--menu-ink)); }
.scan-suggestion-sub{ font-size: .75rem; color: rgba(var(--menu-ink-soft), .6); }
.scan-suggestion-empty{ padding: .625rem; font-size: .8125rem; line-height: 1.55; color: rgba(var(--menu-ink-soft), .72); }

.scan-deep-row{ display: flex; gap: .375rem; align-items: baseline; flex-wrap: wrap; }
.scan-linkbtn{
  padding: 0;
  font: inherit;
  font-size: .75rem;
  color: rgba(var(--primary), 1);
  background: none;
  border: 0;
  border-bottom: 1px solid rgba(var(--primary), .45);
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
}
.scan-linkbtn:hover{ color: rgb(var(--ink)); border-color: rgba(var(--ink), .6); }
.scan-linkbtn:focus-visible{ outline: 2px solid rgba(var(--primary), .85); outline-offset: 2px; }
.scan-linkbtn[disabled]{ opacity: .55; cursor: wait; }

.scan-suggestion-note{
  padding: .375rem .625rem .5rem;
  font-size: .6875rem;
  color: rgba(var(--menu-ink-soft), .55);
  border-bottom: 1px solid rgba(var(--menu-primary), .18);
  margin-bottom: .25rem;
}

.scan-suggestion-deep{
  display: flex;
  gap: .3125rem;
  flex-wrap: wrap;
  padding: .5rem .625rem;
  margin-top: .25rem;
  border-top: 1px solid rgba(var(--menu-primary), .18);
  font-size: .75rem;
  color: rgba(var(--menu-ink-soft), .6);
  cursor: pointer;
  border-radius: 0 0 9px 9px;
  transition: background-color .14s ease;
}
.scan-suggestion-deep:hover{ background: rgba(var(--menu-primary), .14); }

/* When autocomplete found nothing this is the only way forward, so it
   stops being a footnote and becomes the thing to press. */
.scan-suggestion-deep-primary{
  justify-content: center;
  margin: .375rem .25rem .25rem;
  padding: .625rem;
  border: 1px solid rgba(var(--menu-primary), .55);
  border-radius: 9px;
  background: rgba(var(--menu-primary), .16);
}
.scan-suggestion-deep-primary:hover{ background: rgba(var(--menu-primary), .28); }
.scan-suggestion-deepcta{
  font-size: .875rem;
  font-weight: 600;
  color: rgb(var(--menu-ink));
}
.scan-suggestion-deeplink{ color: rgb(var(--menu-primary)); border-bottom: 1px solid rgba(var(--menu-primary), .5); }

.scan-chosen{
  display: none;
  align-items: flex-start;
  gap: var(--s-3);
  padding: .6875rem .75rem;
  border: 1px solid rgba(var(--rank-top), .35);
  border-radius: 11px;
  background: rgba(var(--rank-top), .08);
}
.scan-chosen[data-on="true"]{ display: flex; }
.scan-chosen .ic{ flex: none; width: 1rem; height: 1rem; margin-top: .15rem; color: rgb(var(--rank-top)); }
.scan-chosen-body{ flex: 1; min-width: 0; }
.scan-chosen-name{ font-size: .875rem; font-weight: 500; color: rgb(var(--ink)); }
.scan-chosen-addr{ font-size: .75rem; line-height: 1.5; color: rgba(var(--ink-soft), .62); }
.scan-chosen-clear{
  flex: none;
  padding: .125rem .375rem;
  font: inherit;
  font-size: .75rem;
  color: rgba(var(--ink-soft), .7);
  background: none;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  transition: color .15s ease, background-color .15s ease;
}
.scan-chosen-clear:hover{ color: rgb(var(--ink)); background: rgba(var(--primary), .14); }
.scan-chosen-clear:focus-visible{ outline: 2px solid rgba(var(--primary), .85); outline-offset: 1px; }

/* ---- turnstile, errors, submit ----------------------------------- */
.scan-turnstile{ min-height: 0; }
.scan-turnstile:not(:empty){ margin-top: var(--s-2); }

.scan-alert{
  display: none;
  gap: var(--s-3);
  padding: .75rem .875rem;
  font-size: .875rem;
  line-height: 1.6;
  border-radius: 11px;
  border: 1px solid rgba(var(--rank-low), .4);
  background: rgba(var(--rank-low), .1);
  color: rgb(var(--ink));
}
.scan-alert[data-on="true"]{ display: flex; }
.scan-alert a{ color: rgb(var(--ink)); text-underline-offset: 3px; }

.scan-submit{ width: 100%; justify-content: center; margin-top: var(--s-2); }
.scan-submit[disabled]{ opacity: .55; cursor: not-allowed; transform: none; }
.scan-legal{ margin: var(--s-4) 0 0; font-size: .75rem; line-height: 1.6; color: rgba(var(--ink-soft), .5); }
.scan-legal a{ color: rgba(var(--ink-soft), .72); }

/* ------------------------------------------------------------------ */
/* Results page                                                        */
/* ------------------------------------------------------------------ */
.scan-result{ padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(3rem, 6vw, 5rem); position: relative; }

.scan-result-head{ display: grid; gap: var(--s-4); margin-bottom: clamp(1.5rem, 3vw, 2.25rem); }
.scan-result-title{
  margin: 0;
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: clamp(1.625rem, 3.4vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: rgb(var(--ink));
  text-wrap: balance;
}
.scan-result-meta{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2) var(--s-4);
  font-size: .875rem;
  color: rgba(var(--ink-soft), .66);
}
.scan-chip{
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  padding: .25rem .625rem;
  font-size: .75rem;
  border: 1px solid rgba(var(--primary), .3);
  border-radius: 999px;
  background: rgba(var(--primary), .09);
  color: rgba(var(--ink-soft), .9);
}

/* ---- progress ---------------------------------------------------- */
.scan-progress{ display: grid; gap: var(--s-4); padding: clamp(1.5rem, 3vw, 2rem); margin-bottom: var(--s-8); }
.scan-progress[hidden]{ display: none; }
.scan-progress-row{ display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-4); }
.scan-progress-label{ font-size: .9375rem; color: rgba(var(--ink-soft), .8); }
.scan-progress-count{ font-size: .875rem; color: rgba(var(--ink-soft), .6); }
.scan-bar{ height: 6px; border-radius: 999px; background: rgba(var(--primary), .16); overflow: hidden; }
.scan-bar-fill{
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: rgb(var(--primary));
  transform-origin: left;
  transition: width .5s cubic-bezier(.4, 0, .2, 1);
}

/* ---- headline stats ---------------------------------------------- */
.scan-stats{ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); margin-bottom: var(--s-8); }
@media (min-width: 52rem){ .scan-stats{ grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.scan-stat{ padding: clamp(1rem, 2vw, 1.375rem); }
.scan-stat-value{
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
  line-height: 1;
  letter-spacing: -0.04em;
  color: rgb(var(--ink));
  font-variant-numeric: tabular-nums;
}
.scan-stat-label{ margin-top: .5rem; font-size: .8125rem; line-height: 1.5; color: rgba(var(--ink-soft), .62); }
.scan-stat-delta{ margin-top: .375rem; font-size: .75rem; font-weight: 500; }
.scan-up{ color: rgb(var(--rank-top)); }
.scan-down{ color: rgb(var(--rank-low)); }
.scan-flat{ color: rgba(var(--ink-soft), .5); }

/* ---- map --------------------------------------------------------- */
.scan-map-panel{ overflow: hidden; margin-bottom: var(--s-8); }
.scan-map-head{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-4) clamp(1rem, 2vw, 1.375rem);
  border-bottom: 1px solid rgba(var(--primary), .16);
}
.scan-map{ height: clamp(22rem, 62vh, 36rem); width: 100%; background: rgba(var(--void), .6); }
.scan-map-fallback{
  display: grid;
  place-items: center;
  height: 100%;
  padding: var(--s-8);
  text-align: center;
  font-size: .875rem;
  color: rgba(var(--ink-soft), .55);
}

.scan-legend{ display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); }
.scan-legend-item{ display: inline-flex; align-items: center; gap: .4375rem; font-size: .75rem; color: rgba(var(--ink-soft), .7); }
.scan-legend-swatch{ width: .75rem; height: .75rem; border-radius: 999px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .35) inset; }

/* The pin itself, drawn as an HTML overlay on the map. */
.scan-pin{
  position: absolute;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, .9);
  font-family: 'Manrope', sans-serif;
  font-size: .8125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .45), 0 6px 14px -6px rgba(0, 0, 0, .6);
  cursor: default;
  transition: transform .18s var(--ease-spring);
  will-change: transform;
}
.scan-pin:hover{ transform: translate(-50%, -50%) scale(1.14); z-index: 5; }
.scan-pin[data-band="top"]{ background: rgb(var(--rank-top)); }
.scan-pin[data-band="mid"]{ background: rgb(var(--rank-mid)); color: #1b1304; }
.scan-pin[data-band="low"]{ background: rgb(var(--rank-low)); }
.scan-pin[data-band="none"]{ background: rgb(var(--rank-none)); font-size: .9375rem; }
.scan-pin[data-band="pending"]{
  background: rgba(var(--rank-none), .35);
  border-color: rgba(255, 255, 255, .45);
  color: transparent;
}
.scan-pin[data-band="error"]{ background: rgba(var(--rank-none), .6); font-size: .75rem; }

/* ---- grid fallback / table --------------------------------------- */
.scan-gridview{ display: grid; gap: 4px; padding: clamp(1rem, 2vw, 1.5rem); justify-content: center; }
.scan-gridview-cell{
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 8px;
  font-family: 'Manrope', sans-serif;
  font-size: .8125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #fff;
}

/* ---- competitors -------------------------------------------------- */
.scan-two{ display: grid; gap: var(--s-6); margin-bottom: var(--s-8); }
@media (min-width: 56rem){ .scan-two{ grid-template-columns: 1fr 1fr; } }
.scan-list{ margin: var(--s-4) 0 0; padding: 0; list-style: none; display: grid; gap: .125rem; }
/* Narrow first: on a phone the rating and coverage go under the name
   rather than stealing half the width and wrapping every listing into
   three lines. */
.scan-list li{
  display: grid;
  grid-template-columns: 1.75rem minmax(0, 1fr);
  gap: .1875rem var(--s-3);
  align-items: baseline;
  padding: .625rem .25rem;
  border-bottom: 1px solid rgba(var(--primary), .1);
  font-size: .875rem;
  color: rgba(var(--ink-soft), .82);
}
.scan-list li > .scan-list-meta{ grid-column: 2; white-space: normal; }
@media (min-width: 36rem){
  .scan-list li{ grid-template-columns: 1.75rem minmax(0, 1fr) auto; gap: var(--s-3); padding: .5rem .25rem; }
  .scan-list li > .scan-list-meta{ grid-column: auto; white-space: nowrap; }
}
.scan-list li:last-child{ border-bottom: 0; }
.scan-list-rank{ font-family: 'Manrope', sans-serif; font-weight: 600; color: rgba(var(--ink-soft), .5); font-variant-numeric: tabular-nums; }
.scan-list-meta{ font-size: .75rem; color: rgba(var(--ink-soft), .5); white-space: nowrap; }
.scan-list-name{ display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; min-width: 0; }
/* The site strips underlines from links everywhere else, which left
   these looking like plain text. On a phone there is no hover to hint
   otherwise, so nothing said they could be tapped at all. */
.scan-list-name > a:first-child{
  color: rgb(var(--ink));
  text-decoration: underline;
  text-decoration-color: rgba(var(--primary), .6);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  padding: .1875rem 0;
}
.scan-list-name > a:first-child:hover,
.scan-list-name > a:first-child:focus-visible{
  color: rgb(var(--primary));
  text-decoration-color: rgb(var(--primary));
}
.scan-list-name > a:first-child:focus-visible{ outline: 2px solid rgba(var(--primary), .85); outline-offset: 2px; }
.scan-list-site{
  display: inline-block;
  padding: .1875rem 0;
  font-size: .75rem;
  color: rgba(var(--ink-soft), .7);
  text-decoration: none;
  border-bottom: 1px solid rgba(var(--ink-soft), .35);
}
.scan-list-site:hover,
.scan-list-site:focus-visible{ color: rgb(var(--ink)); border-color: rgba(var(--ink), .6); }
.scan-list-site:focus-visible{ outline: 2px solid rgba(var(--primary), .85); outline-offset: 2px; }
.scan-rival{ padding: .1875rem .4375rem; font-size: .6875rem; }

/* ---- call to action ----------------------------------------------- */
.scan-cta{ padding: clamp(1.75rem, 4vw, 3rem); text-align: center; }
.scan-cta .scan-h2{ max-width: 34rem; margin-inline: auto; }
.scan-cta .scan-sub{ max-width: 36rem; margin-inline: auto; }
.scan-cta-actions{ display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-4); margin-top: var(--s-8); }

/* ---- states -------------------------------------------------------- */
.scan-state{ display: grid; gap: var(--s-4); padding: clamp(2rem, 5vw, 3.5rem); text-align: center; }
.scan-state .ic{ width: 1.75rem; height: 1.75rem; margin: 0 auto; color: rgba(var(--primary), .8); }

/* ------------------------------------------------------------------ */
/* Admin                                                               */
/* ------------------------------------------------------------------ */
.scan-admin{ padding: clamp(2.5rem, 5vw, 4rem) 0; }
.scan-login{ max-width: 24rem; margin: clamp(2rem, 8vw, 5rem) auto; padding: clamp(1.5rem, 3vw, 2rem); }

.scan-totals{ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); margin-bottom: var(--s-8); }
@media (min-width: 48rem){ .scan-totals{ grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.scan-table-wrap{ overflow-x: auto; border-radius: 20px; }
.scan-table{ width: 100%; border-collapse: collapse; font-size: .8125rem; min-width: 60rem; }
.scan-table th{
  position: sticky;
  top: 0;
  padding: .75rem;
  text-align: left;
  font-weight: 500;
  white-space: nowrap;
  color: rgba(var(--ink-soft), .6);
  background: rgb(var(--surface));
  border-bottom: 1px solid rgba(var(--primary), .2);
}
.scan-table td{
  padding: .75rem;
  vertical-align: top;
  border-bottom: 1px solid rgba(var(--primary), .1);
  color: rgba(var(--ink-soft), .85);
}
.scan-table tr:hover td{ background: rgba(var(--primary), .05); }
.scan-table a{ color: rgb(var(--ink)); }
.scan-table-strong{ color: rgb(var(--ink)); font-weight: 500; }

.scan-badge{
  display: inline-block;
  padding: .125rem .5rem;
  border-radius: 999px;
  font-size: .6875rem;
  font-weight: 500;
  white-space: nowrap;
}
.scan-badge[data-status="complete"]{ background: rgba(var(--rank-top), .16); color: rgb(var(--rank-top)); }
.scan-badge[data-status="running"],
.scan-badge[data-status="pending"]{ background: rgba(var(--rank-mid), .16); color: rgb(var(--rank-mid)); }
.scan-badge-test{ background: rgba(var(--ink-soft), .16); color: rgba(var(--ink-soft), .9); }
/* Started from a script rather than a browser, so: my testing, not a visitor. */
.scan-badge-script{ background: rgba(var(--secondary), .22); color: rgba(var(--ink), .9); }
.scan-toggle{
  display: inline-flex;
  align-items: center;
  gap: .4375rem;
  font-size: .75rem;
  color: rgba(var(--ink-soft), .7);
  cursor: pointer;
}
.scan-toggle input{ accent-color: rgb(var(--primary)); cursor: pointer; }

.scan-badge[data-status="failed"]{ background: rgba(var(--rank-low), .16); color: rgb(var(--rank-low)); }

.scan-btn-row{ display: flex; gap: var(--s-2); flex-wrap: wrap; }
.scan-mini{
  padding: .3125rem .625rem;
  font: inherit;
  font-size: .75rem;
  font-weight: 500;
  color: rgb(var(--ink));
  background: rgba(var(--primary), .12);
  border: 1px solid rgba(var(--primary), .3);
  border-radius: 8px;
  cursor: pointer;
  transition: transform .15s var(--ease-spring), background-color .15s ease, border-color .15s ease;
}
.scan-mini:hover{ transform: translateY(-1px); background: rgba(var(--primary), .2); border-color: rgba(var(--primary), .45); }
.scan-mini:active{ transform: translateY(0) scale(.97); }
.scan-mini:focus-visible{ outline: 2px solid rgba(var(--primary), .85); outline-offset: 2px; }
.scan-mini[disabled]{ opacity: .5; cursor: not-allowed; transform: none; }

.scan-empty{ padding: clamp(2rem, 5vw, 3rem); text-align: center; color: rgba(var(--ink-soft), .6); font-size: .9375rem; }

/* ------------------------------------------------------------------ */
/* Service area editor                                                 */
/* ------------------------------------------------------------------ */
.scan-area-layout{ display: grid; gap: var(--s-6); }
@media (min-width: 64rem){
  .scan-area-layout{ grid-template-columns: minmax(0, 1fr) 22rem; align-items: start; }
}
.scan-area-layout .scan-map{ height: clamp(26rem, 60vh, 38rem); }


/* ------------------------------------------------------------------ */
/* Cedar City adjustments to the components above                      */
/*                                                                     */
/* Everything above this line is the Atlas layout with Cedar City's     */
/* tokens poured in. These are the places where a straight token swap   */
/* is not enough: where --primary was carrying an accent rather than a  */
/* line, and where the type wants Manrope's heavier weights.            */
/* ------------------------------------------------------------------ */

/* Display type. Manrope at 800 is what the rest of the site uses for a
   headline; 600 is Unbounded's weight and reads thin here. */
.scan-title, .scan-result-title{ font-weight: 800; letter-spacing: -.035em; }
.scan-h2, .scan-card-title, .scan-stat-value{ font-weight: 800; }
.scan-label{ font-family: 'Manrope', sans-serif; font-weight: 700; }

/* The hero sits on sand, the way every other Cedar City page opens. No
   grid overlay and no glow: the Atlas page inherits both from its
   service pages and this site has neither. */
.scan-hero{ background: var(--sand); }
.scan-result, .scan-admin{ background: var(--paper); }
.svc-hero-grid, .svc-hero-glow{ display: none; }

/* Inputs: the /get-ranked treatment, warm field on a white card. */
.scan-input{
  padding: .95rem 1rem;
  font-size: 1rem;
  background: #FBF8F5;
  border: 1.5px solid rgba(31,42,48,.14);
  border-radius: 10px;
}
.scan-input:hover{ border-color: rgba(31,42,48,.3); }
.scan-input:focus-visible{
  border-color: var(--red);
  outline: 2px solid var(--red);
  outline-offset: 1px;
}

/* Accents that were reading as structure once --primary went canyon. */
.scan-points .ic{ color: var(--red); }
.scan-state .ic{ color: var(--red); }
.scan-bar-fill{ background: var(--red); }
.scan-linkbtn{ color: var(--red); border-bottom-color: rgba(182,61,43,.45); }
.scan-linkbtn:hover{ color: var(--red-dk); border-bottom-color: var(--red-dk); }
.scan-toggle input{ accent-color: var(--red); }
.scan-chip{
  border-color: rgba(31,42,48,.14);
  background: rgba(31,42,48,.05);
}
.scan-list-name > a:first-child{ text-decoration-color: rgba(182,61,43,.5); }
.scan-list-name > a:first-child:hover,
.scan-list-name > a:first-child:focus-visible{ color: var(--red); text-decoration-color: var(--red); }

/* Panels: a hairline rather than a tinted border, and the card gradient
   doing the work instead. */
.scan-panel{
  border: 1px solid rgba(31,42,48,.09);
  border-radius: 16px;
}
.scan-preview-grid{ border-color: rgba(31,42,48,.1); background: rgba(255,255,255,.75); }
.scan-table-wrap{ border-radius: 16px; }

/* Pins carry white numerals on every band, so the amber needs to be
   dark enough to hold them. */
.scan-pin[data-band="mid"]{ color: #fff; }
.scan-pin{ box-shadow: 0 2px 5px rgba(31,42,48,.3), 0 6px 14px -6px rgba(31,42,48,.4); }
.scan-legend-swatch{ box-shadow: 0 0 0 1px rgba(31,42,48,.18) inset; }

/* ---- where to scan ------------------------------------------------ */
/* The owner-only area picker, and the warning anyone gets when their
   keyword names a town their map pin is nowhere near. */
.scan-admin-field{
  padding: var(--s-3);
  border: 1px dashed rgba(31,42,48,.22);
  border-radius: 11px;
}
select.scan-input{
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, rgba(61,74,82,.75) 50%),
                    linear-gradient(135deg, rgba(61,74,82,.75) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2.25rem;
  cursor: pointer;
}
.scan-mismatch{
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
  padding: .5rem .625rem;
  border-left: 2px solid rgb(var(--rank-mid));
  background: rgba(var(--rank-mid), .1);
  border-radius: 0 8px 8px 0;
  color: rgba(var(--ink-soft), .85);
}
.scan-mismatch[hidden]{ display: none; }

/* The hero's example scan. A real one, screenshotted from the tool, which
   argues for the thing far better than a diagram of it could. The frame is
   the same panel treatment the results page uses, so it reads as a window
   into the product rather than a stock image. */
.scan-example{
  margin: clamp(2rem, 4vw, 2.75rem) 0 0;
  max-width: 34rem;
}
.scan-example img{
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(31,42,48,.09);
  border-radius: 14px;
  box-shadow: var(--lift-2);
}
.scan-example figcaption{
  margin: var(--s-3) 0 0;
  font-size: .8125rem;
  line-height: 1.65;
  color: rgba(var(--ink-soft), .62);
  text-wrap: pretty;
}

/* The mobile tap-to-call bar, lifted from /get-ranked so a phone
   visitor always has the call in reach. */
.callbar{ display: none; }
@media (max-width: 760px){
  .callbar{
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 200;
    display: block;
    background: var(--canyon);
    border-top: 1px solid rgba(242,244,245,.12);
    padding: .5rem .75rem calc(.5rem + env(safe-area-inset-bottom));
  }
  .callbar a{
    display: flex; align-items: center; justify-content: center; gap: .6rem;
    padding: .7rem; border-radius: 10px;
    background: var(--red); color: #fff; text-decoration: none;
  }
  .callbar a:active{ background: var(--red-dk); }
  .cb-ic{ display: inline-flex; }
  .cb-t{ display: flex; flex-direction: column; line-height: 1.15; }
  .cb-l{ font-size: .62rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; opacity: .78; }
  .cb-n{ font-family: 'Manrope', sans-serif; font-weight: 800; font-size: 1.02rem; }
  /* Clear the bar so it never sits on top of the submit button. The
     padding goes on the sections, not on main: on main it adds a white
     band between the last section's background and the footer. */
  .scan-hero, .scan-result, .scan-admin{ padding-bottom: 5.5rem; }
}
