/* Cannect Website Analyser — dark module, matched to cannectdigital.com.
 *
 * Every rule is namespaced under .cannect-an so it cannot collide with the theme.
 * Colours below were sampled directly from the site layout:
 *   page dark  #0B0F1A   card  #141622   border #1F222B
 *   gold       #F4B301   blue  #3C87EB   green  #2AAB45   red #E3453A
 * Traffic-light colours are lifted slightly from the sampled values so small
 * text still clears WCAG AA against the dark card.
 */

.cannect-an {
  --cd-ink:        #0B0F1A;
  --cd-surface:    #141622;
  --cd-surface-2:  #1A1D2B;
  --cd-line:       #1F222B;
  --cd-line-2:     #2A2F3E;
  --cd-white:      #FDFEFF;
  --cd-text:       #A6ACB8;
  --cd-muted:      #8A909E;

  --cd-gold:       #F4B301;
  --cd-gold-lt:    #F5B329;
  --cd-blue:       #3C87EB;
  --cd-green:      #2AAB45;
  --cd-red:        #E3453A;

  /* verdict colours — brightened for small text on #141622 */
  --cd-good:       #34BE55;
  --cd-warn:       #F4B301;
  --cd-bad:        #F2615A;
  --cd-good-bg:    rgba(52, 190, 85, .13);
  --cd-warn-bg:    rgba(244, 179, 1, .14);
  --cd-bad-bg:     rgba(242, 97, 90, .14);

  --cd-radius:     16px;
  --cd-radius-sm:  12px;
  --cd-rainbow:    linear-gradient(90deg, #E3453A 0%, #F4B301 34%, #2AAB45 67%, #3C87EB 100%);

  /* Verdana is wide, so type is set a touch smaller and tighter than a
     geometric sans would be, and headings get negative tracking. */
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: var(--cd-text);
  background: var(--cd-ink);
  padding: 72px 20px;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;

  /* Full-bleed dark band even when the theme wraps content in a centred
     container. The box-shadow paints the background sideways past the
     container edge; clip-path stops it bleeding above and below.
     Deliberately NOT width:100vw — on Windows 100vw includes the scrollbar
     and produces a horizontal scrollbar across the whole site. */
  position: relative;
  box-shadow: 0 0 0 100vmax var(--cd-ink);
  clip-path: inset(0 -100vmax);
}
.cannect-an *, .cannect-an *::before, .cannect-an *::after { box-sizing: border-box; }
/* The UA rule for [hidden] is display:none, which loses to the author
   display:inline-flex on .an-btn. Without this, a "hidden" button renders. */
.cannect-an [hidden] { display: none !important; }
.cannect-an p, .cannect-an ul, .cannect-an h2, .cannect-an h3, .cannect-an h4 { margin: 0; }

.cannect-an .an-inner { max-width: 1120px; margin: 0 auto; }

/* ---------- headings ---------- */

.cannect-an .an-kicker {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--cd-gold);
  margin-bottom: 14px;
}
.cannect-an h2 {
  font-size: clamp(24px, 3.2vw, 38px);
  line-height: 1.14;
  letter-spacing: -.02em;
  font-weight: 700;
  color: var(--cd-white);
  margin-bottom: 14px;
}
/* The gold→red gradient run used on the site's emphasis phrases. */
.cannect-an .an-grad {
  background: linear-gradient(95deg, #F4B301 0%, #F07A1E 48%, #E3453A 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.cannect-an .an-lead { font-size: 15px; color: var(--cd-text); max-width: 46ch; }
.cannect-an .an-small { font-size: 12.5px; line-height: 1.6; color: var(--cd-muted); }
.cannect-an .an-small b { color: var(--cd-text); }

/* ---------- layout ---------- */

.cannect-an .an-grid {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 44px;
  align-items: start;
}
@media (max-width: 940px) { .cannect-an .an-grid { grid-template-columns: 1fr; gap: 32px; } }

/* Bullets: absolutely-positioned markers so <b> stays inline. */
.cannect-an .an-points { list-style: none; padding: 0; margin: 22px 0 0; }
.cannect-an .an-points li {
  position: relative; padding-left: 30px; margin-bottom: 14px; font-size: 14.5px;
}
.cannect-an .an-points li b { color: var(--cd-white); }
.cannect-an .an-points li::before {
  content: ""; position: absolute; left: 0; top: 5px;
  width: 16px; height: 16px; border-radius: 5px;
  background: var(--cd-gold);
  box-shadow: inset 0 0 0 4px var(--cd-ink);
}
/* Same four colours, in the same order, as the result cards below. */
.cannect-an .an-points li:nth-child(2)::before { background: var(--cd-blue); }
.cannect-an .an-points li:nth-child(3)::before { background: #E0653C; }
.cannect-an .an-points li:nth-child(4)::before { background: var(--cd-green); }

/* ---------- form ---------- */

.cannect-an .an-form {
  background: var(--cd-surface);
  border: 1px solid var(--cd-line);
  border-radius: var(--cd-radius);
  padding: 30px;
  position: relative;
  overflow: hidden;
}
/* Signature rainbow hairline along the bottom of a card. */
.cannect-an .an-form::after,
.cannect-an .an-res-card::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 3px; background: var(--cd-rainbow);
}
@media (max-width: 640px) { .cannect-an { padding: 48px 16px; } .cannect-an .an-form { padding: 22px; } }

/* Spacing lives on the field wrapper, not the label. The label cannot own its
   top margin reliably: WordPress can reparent labels (see the wpautop note in
   the PHP), and :first-of-type then resolves against the wrong parent. */
.cannect-an .an-field + .an-field { margin-top: 18px; }
.cannect-an .an-form label {
  display: block; font-size: 12.5px; font-weight: 700;
  color: var(--cd-white); margin: 0 0 7px;
}
.cannect-an .an-form .an-opt { font-weight: 400; color: var(--cd-muted); }

.cannect-an .an-form input[type="text"],
.cannect-an .an-form input[type="email"],
.cannect-an .an-form input[type="tel"] {
  width: 100%; padding: 14px 16px;
  font-family: inherit; font-size: 15px;
  color: var(--cd-white);
  background: var(--cd-ink);
  border: 1px solid var(--cd-line-2);
  border-radius: 10px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.cannect-an .an-form input::placeholder { color: #616875; }
.cannect-an .an-form input:focus {
  outline: none;
  border-color: var(--cd-gold);
  box-shadow: 0 0 0 3px rgba(244, 179, 1, .18);
}
.cannect-an .an-form input[aria-invalid="true"] { border-color: var(--cd-bad); }
.cannect-an .an-hint { font-size: 12px; color: var(--cd-muted); margin-top: 7px; }

/* The consent row is itself a <label>, so it inherits the bold rule above.
   Selector repeats .an-form to outrank `.cannect-an .an-form label`. */
.cannect-an .an-form label.an-consent,
.cannect-an .an-form label.an-consent span {
  font-weight: 400;
  color: var(--cd-muted);
}
.cannect-an .an-consent-row { margin-top: 20px; }
.cannect-an .an-form label.an-consent {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 12.5px; line-height: 1.5;
  margin: 0; cursor: pointer;
}
.cannect-an .an-submit { margin-top: 22px; }
.cannect-an .an-consent input {
  margin: 2px 0 0; flex: 0 0 auto; width: 16px; height: 16px;
  accent-color: var(--cd-gold);
}
.cannect-an .an-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- buttons ---------- */

.cannect-an .an-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 15px 26px; border: 0; border-radius: 999px;
  font-family: inherit; font-size: 14px; font-weight: 700; letter-spacing: -.01em;
  cursor: pointer; text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.cannect-an .an-btn-gold {
  background: var(--cd-gold); color: var(--cd-ink);
  box-shadow: 0 6px 20px rgba(244, 179, 1, .22);
}
.cannect-an .an-btn-gold:hover { background: var(--cd-gold-lt); transform: translateY(-2px); }
.cannect-an .an-btn-ghost {
  background: rgba(253, 254, 255, .05); color: var(--cd-white);
  box-shadow: inset 0 0 0 1px var(--cd-line-2);
}
.cannect-an .an-btn-ghost:hover { background: rgba(253, 254, 255, .1); transform: translateY(-2px); }
.cannect-an #anSubmit { width: 100%; }
.cannect-an #anSubmit[disabled] { opacity: .55; cursor: progress; transform: none; box-shadow: none; }

/* ---------- progress ---------- */

.cannect-an .an-progress { display: none; margin-top: 22px; }
.cannect-an .an-progress.is-on { display: block; }
.cannect-an .an-bar {
  height: 8px; background: var(--cd-ink); border-radius: 999px;
  overflow: hidden; box-shadow: inset 0 0 0 1px var(--cd-line);
}
.cannect-an .an-bar i {
  display: block; height: 100%; width: 0;
  background: var(--cd-rainbow);
  transition: width .6s cubic-bezier(.4, 0, .2, 1);
}
.cannect-an .an-step { font-size: 12.5px; color: var(--cd-muted); margin-top: 10px; min-height: 20px; }

.cannect-an .an-error {
  display: none; margin-top: 20px; padding: 15px 17px;
  background: var(--cd-bad-bg); border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgba(242, 97, 90, .35);
  font-size: 13px; color: #FFD9D6;
}
.cannect-an .an-error.is-on { display: block; }
.cannect-an .an-error b { display: block; color: #fff; font-size: 14px; margin-bottom: 5px; }

/* ---------- results ---------- */

.cannect-an .an-results { display: none; margin-top: 56px; }
.cannect-an .an-results.is-on { display: block; animation: an-rise .5s ease both; }
@keyframes an-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Overall verdict banner */
.cannect-an .an-verdict {
  background: var(--cd-surface);
  border: 1px solid var(--cd-line);
  border-radius: var(--cd-radius);
  padding: 30px;
  display: grid; grid-template-columns: 132px 1fr; gap: 30px; align-items: center;
  margin-bottom: 20px;
}
@media (max-width: 720px) {
  .cannect-an .an-verdict { grid-template-columns: 1fr; gap: 20px; text-align: center; }
  .cannect-an .an-gauge { margin: 0 auto; }
}
.cannect-an .an-gauge { position: relative; width: 132px; height: 132px; }
.cannect-an .an-gauge svg { transform: rotate(-90deg); display: block; }
.cannect-an .an-gauge .val {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-weight: 700; font-size: 34px; letter-spacing: -.03em; color: var(--cd-white);
}
.cannect-an .an-gauge .val small {
  font-size: 10px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--cd-muted); margin-top: 2px;
}
.cannect-an .an-vd-site {
  font-size: 11px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--cd-muted); margin-bottom: 8px;
  overflow-wrap: anywhere;
}
.cannect-an .an-vd-head {
  font-size: clamp(20px, 2.4vw, 27px); font-weight: 700;
  letter-spacing: -.02em; line-height: 1.2; color: var(--cd-white); margin-bottom: 10px;
}
.cannect-an .an-vd-head .good { color: var(--cd-good); }
.cannect-an .an-vd-head .warn { color: var(--cd-warn); }
.cannect-an .an-vd-head .bad  { color: var(--cd-bad); }
.cannect-an .an-vd-body { font-size: 14px; color: var(--cd-text); max-width: 62ch; }

/* "Start here" priority box */
.cannect-an .an-fix {
  background: var(--cd-surface);
  border: 1px solid var(--cd-line);
  border-left: 3px solid var(--cd-gold);
  border-radius: var(--cd-radius-sm);
  padding: 22px 26px; margin-bottom: 26px;
}
.cannect-an .an-fix h4 {
  font-size: 11px; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--cd-gold); margin-bottom: 14px;
}
.cannect-an .an-fix ol { margin: 0; padding: 0; list-style: none; counter-reset: fx; }
.cannect-an .an-fix li {
  counter-increment: fx; position: relative; padding-left: 34px;
  margin-bottom: 12px; font-size: 14px; color: var(--cd-text);
}
.cannect-an .an-fix li:last-child { margin-bottom: 0; }
.cannect-an .an-fix li::before {
  content: counter(fx); position: absolute; left: 0; top: 1px;
  width: 22px; height: 22px; border-radius: 7px;
  background: rgba(244, 179, 1, .14); color: var(--cd-gold);
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.cannect-an .an-fix li b { color: var(--cd-white); }

/* Three result cards */
/* Four pillars since v1.10.0. Two-by-two rather than four across: at four
   columns each card is under 280px on a 1200px page, and the checklist lines
   wrap to three or four rows each, which reads as a wall of text. */
.cannect-an .an-res-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 760px) { .cannect-an .an-res-cards { grid-template-columns: 1fr; } }

.cannect-an .an-res-card {
  position: relative; overflow: hidden;
  background: var(--cd-surface);
  border: 1px solid var(--cd-line);
  border-radius: var(--cd-radius);
  padding: 26px 24px 28px;
}
/* Soft corner glow in the card's own accent colour, as on the R¹/R²/R³ cards. */
.cannect-an .an-res-card::before {
  content: ""; position: absolute; top: -60px; right: -60px;
  width: 190px; height: 190px; border-radius: 50%;
  background: var(--cd-accent, var(--cd-gold)); opacity: .10; filter: blur(28px);
  pointer-events: none;
}
.cannect-an .an-res-card.is-speed { --cd-accent: var(--cd-gold); }
.cannect-an .an-res-card.is-google { --cd-accent: var(--cd-blue); }
.cannect-an .an-res-card.is-ux { --cd-accent: #E0653C; }
.cannect-an .an-res-card.is-ai { --cd-accent: var(--cd-green); }

.cannect-an .an-ic {
  width: 48px; height: 48px; border-radius: var(--cd-radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 23px; line-height: 1; margin-bottom: 20px;
  background: var(--cd-accent);
}
/* Black icons on all three tiles. These were emoji until v1.8.0, and the
   lightning bolt was the problem: Windows and Android render U+26A1 as a yellow
   colour glyph, which is invisible on a gold tile no matter what `color` says.
   Colour emoji ignore CSS colour entirely. Inline SVG on currentColor does not,
   so the icons now match the brand instead of the operating system. */
.cannect-an .an-ic { color: #0B0F1A; }
.cannect-an .an-ic-svg { width: 25px; height: 25px; display: block; }

.cannect-an .an-rc-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--cd-muted); margin-bottom: 8px;
}
.cannect-an .an-rc-verdict {
  font-size: 22px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2;
  margin-bottom: 4px;
}
.cannect-an .an-rc-verdict.good { color: var(--cd-good); }
.cannect-an .an-rc-verdict.warn { color: var(--cd-warn); }
.cannect-an .an-rc-verdict.bad  { color: var(--cd-bad); }
.cannect-an .an-rc-score { font-size: 12px; color: var(--cd-muted); margin-bottom: 14px; }
.cannect-an .an-rc-plain {
  font-size: 13.5px; color: var(--cd-white); line-height: 1.5;
  padding-bottom: 16px; margin-bottom: 16px;
  border-bottom: 1px solid var(--cd-line);
}

/* Vitals rows: name + verdict left, headline value right. */
.cannect-an .an-cwv { display: grid; gap: 8px; margin-bottom: 18px; }
.cannect-an .an-cwv .tile {
  background: var(--cd-ink); border: 1px solid var(--cd-line);
  border-radius: 10px; padding: 11px 13px;
  display: grid; grid-template-columns: 1fr auto; align-items: baseline;
  column-gap: 10px; row-gap: 3px;
}
.cannect-an .an-cwv .tile > span:first-child {
  grid-column: 1; grid-row: 1; font-size: 12px; font-weight: 700; color: var(--cd-white);
}
.cannect-an .an-cwv .tile b {
  grid-column: 2; grid-row: 1; font-size: 16px; text-align: right; white-space: nowrap;
}
.cannect-an .an-cwv .tile .st { font-size: 10px; font-weight: 700; letter-spacing: .04em; white-space: nowrap; }
.cannect-an .an-cwv .tile .st:not(.an-tech) { grid-column: 1; grid-row: 2; }
.cannect-an .an-cwv .tile .an-tech {
  grid-column: 2; grid-row: 2; text-align: right;
  color: var(--cd-muted); font-weight: 400;
}

.cannect-an .an-checklist { list-style: none; padding: 0; margin: 0; font-size: 13.5px; }
.cannect-an .an-checklist li {
  position: relative; padding-left: 24px; margin-bottom: 10px; line-height: 1.45;
}
.cannect-an .an-checklist li:last-child { margin-bottom: 0; }
.cannect-an .an-checklist li b { color: var(--cd-white); }
.cannect-an .an-checklist li::before {
  position: absolute; left: 0; top: 0;
  width: 16px; height: 16px; border-radius: 5px;
  font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.cannect-an .an-checklist .ok::before  { content: "\2713"; background: var(--cd-good-bg); color: var(--cd-good); }
.cannect-an .an-checklist .no::before  { content: "\2717"; background: var(--cd-bad-bg);  color: var(--cd-bad); }
.cannect-an .an-checklist .mid::before { content: "!";     background: var(--cd-warn-bg); color: var(--cd-warn); }

/* ---------- footer of the report ---------- */

.cannect-an .an-res-actions {
  display: flex; gap: 14px; flex-wrap: wrap; align-items: center;
  margin-top: 30px;
}
@media (max-width: 560px) {
  .cannect-an .an-res-actions { flex-direction: column; align-items: stretch; }
  .cannect-an .an-res-actions .an-btn { width: 100%; }
}
.cannect-an .an-note {
  margin-top: 16px; padding: 13px 15px; border-radius: 10px;
  background: var(--cd-warn-bg); box-shadow: inset 0 0 0 1px rgba(244, 179, 1, .3);
  font-size: 13px; color: #FFE6A8;
}
.cannect-an .an-src {
  font-size: 11.5px; line-height: 1.6; color: #6B7280;
  margin-top: 18px; max-width: 92ch;
}

@media (prefers-reduced-motion: reduce) {
  .cannect-an .an-bar i, .cannect-an .an-btn { transition: none; }
  .cannect-an .an-results.is-on { animation: none; }
}
