/*
 * Two parts:
 *  - #tp-speedcheck       : the input form (left hero column), a light card.
 *  - #tp-speedcheck-dash  : the live result, styled as the dark turbometrics
 *                           dashboard (right hero column, replaces the mockup).
 * Every colour-bearing rule is scoped under one of those ids so it reaches
 * ID-level specificity and overrides the active Elementor Kit's global element
 * rules (which otherwise repaint our text/inputs/links in the theme colours).
 */

/* ---------- Form (left column) ---------- */

#tp-speedcheck.tp-speedcheck {
  max-width: 560px;
}

/* layout="wide": the funnel page puts the form above a full-width result, so
   it spans the same column instead of sitting as a narrow island under a
   full-width headline. Field and button grow with it. */
#tp-speedcheck.tp-speedcheck--wide {
  max-width: none;
  width: 100%;
}

#tp-speedcheck.tp-speedcheck--wide .tp-speedcheck__label {
  font-size: 1.05rem;
}

#tp-speedcheck.tp-speedcheck--wide #tp-speedcheck-url,
#tp-speedcheck.tp-speedcheck--wide .tp-speedcheck__row button {
  padding: 1.05rem 1.25rem;
  font-size: 1.1rem;
}

/* width:100% plus padding must not overflow the column — the theme sets
   border-box globally, but the widget must not depend on that. */
#tp-speedcheck #tp-speedcheck-url,
#tp-speedcheck .tp-speedcheck__row button,
#tp-speedcheck-dash #tp-lead-email,
#tp-speedcheck-dash #tp-lead-submit {
  box-sizing: border-box;
}

#tp-speedcheck .tp-speedcheck__label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
  color: #0B0C10;
}

#tp-speedcheck .tp-speedcheck__row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

#tp-speedcheck #tp-speedcheck-url {
  width: 100%;
  flex: none;
  min-width: 0;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  background: #ffffff;
  color: #0B0C10;
  border: 1px solid #0B0C10;
  border-radius: 6px;
}

#tp-speedcheck #tp-speedcheck-url::placeholder {
  color: #6b7280;
}

#tp-speedcheck #tp-speedcheck-url:focus {
  outline: none;
  border-color: #FF7300;
  box-shadow: 0 0 0 2px rgba(255, 115, 0, 0.25);
}

#tp-speedcheck .tp-speedcheck__honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

#tp-speedcheck .tp-speedcheck__row button {
  width: 100%;
  padding: 0.85rem 1.6rem;
  font-size: 1rem;
  border: none;
  border-radius: 6px;
  background: #FF7300;
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
}

#tp-speedcheck .tp-speedcheck__row button:hover { background: #e56700; }
#tp-speedcheck .tp-speedcheck__row button:disabled { opacity: 0.6; cursor: not-allowed; }

#tp-speedcheck .tp-speedcheck__error {
  margin-top: 0.6rem;
  color: #d63638;
  font-weight: 600;
}

/* ---------- Dashboard (right column) ---------- */

#tp-speedcheck-dash.tp-speedcheck-dash {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
}

/* Our explicit display rules below (flex on progress etc.) would otherwise
   override the [hidden] attribute's display:none, leaving the progress ring
   ("0%") permanently visible. Force hidden to win. */
#tp-speedcheck-dash [hidden] { display: none !important; }

/* Demo (pre-scan) state: same layout, subtle "Beispiel" hint. */
#tp-speedcheck-dash .tp-speedcheck__result.tp-dash--demo { position: relative; }
#tp-speedcheck-dash .tp-speedcheck__result.tp-dash--demo::before {
  content: "Beispiel";
  position: absolute;
  top: 12px;
  right: 14px;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #9aa4b2;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* Scanning state — big progress ring */
#tp-speedcheck-dash .tp-speedcheck__progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-height: 320px;
  padding: 2rem;
  background: #0b0f1a;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
}

#tp-speedcheck-dash .tp-speedcheck__progress-ring {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: conic-gradient(#FF7300 0%, rgba(255, 255, 255, 0.08) 0);
  display: flex;
  align-items: center;
  justify-content: center;
}

#tp-speedcheck-dash .tp-speedcheck__progress-ring::after {
  content: "";
  position: absolute;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: #0b0f1a;
}

#tp-speedcheck-dash .tp-speedcheck__progress-pct {
  position: relative;
  z-index: 1;
  font-size: 1.8rem;
  font-weight: 700;
  color: #ffffff;
}

#tp-speedcheck-dash .tp-speedcheck__progress-pct::after {
  content: "%";
  font-size: 1rem;
  color: #9aa4b2;
  margin-left: 2px;
}

#tp-speedcheck-dash .tp-speedcheck__status {
  color: #9aa4b2;
  font-size: 0.95rem;
  text-align: center;
}

/* Result dashboard */
#tp-speedcheck-dash .tp-speedcheck__result {
  position: relative;
  padding: 1.75rem 1.5rem;
  background: #0b0f1a;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  color: #e6e9ef;
  text-align: center;
}

@keyframes tpDashFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* Staggered fade-up of the sections (skip the absolute hover preview). */
#tp-speedcheck-dash .tp-speedcheck__result > *:not(.tp-dash__preview) {
  animation: tpDashFadeIn 0.5s ease both;
}
#tp-speedcheck-dash .tp-speedcheck__result > *:nth-child(1) { animation-delay: 0.04s; }
#tp-speedcheck-dash .tp-speedcheck__result > *:nth-child(2) { animation-delay: 0.10s; }
#tp-speedcheck-dash .tp-speedcheck__result > *:nth-child(3) { animation-delay: 0.16s; }
#tp-speedcheck-dash .tp-speedcheck__result > *:nth-child(4) { animation-delay: 0.22s; }
#tp-speedcheck-dash .tp-speedcheck__result > *:nth-child(5) { animation-delay: 0.28s; }
#tp-speedcheck-dash .tp-speedcheck__result > *:nth-child(6) { animation-delay: 0.34s; }
#tp-speedcheck-dash .tp-speedcheck__result > *:nth-child(7) { animation-delay: 0.40s; }
#tp-speedcheck-dash .tp-speedcheck__result > *:nth-child(8) { animation-delay: 0.46s; }
#tp-speedcheck-dash .tp-speedcheck__result > *:nth-child(9) { animation-delay: 0.52s; }

/* Hover/tap preview of a filmstrip frame at full size */
/* Hover/tap preview: floats just above the hovered frame (tooltip style);
   left/top/width/height are set from the frame position + natural image size
   in JS. A small caret points down at the frame. */
#tp-speedcheck-dash .tp-dash__preview {
  position: absolute;
  transform: translate(-50%, calc(-100% - 10px));
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #05070d;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s ease;
  pointer-events: none;
  z-index: 8;
}

#tp-speedcheck-dash .tp-dash__preview.is-visible {
  opacity: 1;
  visibility: visible;
}

#tp-speedcheck-dash .tp-dash__preview::after {
  content: "";
  position: absolute;
  /* --tp-caret is set in JS: keeps the caret on the frame when the box is
     clamped to stay inside the card. */
  left: calc(50% + var(--tp-caret, 0px));
  bottom: -6px;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #05070d;
}

/* Filmstrip scroll arrows */
#tp-speedcheck-dash .tp-dash__strip-wrap {
  position: relative;
}

#tp-speedcheck-dash .tp-dash__arrow {
  position: absolute;
  top: 27px;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(20, 24, 34, 0.92);
  color: #ffffff;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
  z-index: 4;
}

#tp-speedcheck-dash .tp-dash__arrow:hover { background: rgba(30, 36, 50, 0.98); }
#tp-speedcheck-dash .tp-dash__arrow--left { left: -8px; }
#tp-speedcheck-dash .tp-dash__arrow--right { right: -8px; }

#tp-speedcheck-dash .tp-dash__gauge-wrap {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

/* Explicit size beats Elementor's global "svg { width:1em; height:1em }"
   (font-icon SVG rule), which otherwise shrinks the gauge to ~1em. */
#tp-speedcheck-dash .tp-dash__gauge {
  display: block;
  width: 150px;
  height: 150px;
}

#tp-speedcheck-dash .tp-dash__band {
  padding: 0.2rem 0.9rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #0b0f1a;
}

#tp-speedcheck-dash .tp-dash__host {
  margin: 1rem 0 0.25rem;
  font-size: 1.6rem;
  font-weight: 700;
  color: #ffffff;
  word-break: break-word;
}

#tp-speedcheck-dash .tp-dash__meta {
  margin: 0 0 1.25rem;
  color: #9aa4b2;
  font-size: 0.95rem;
}

#tp-speedcheck-dash .tp-dash__tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
  margin-bottom: 1.1rem;
}

#tp-speedcheck-dash .tp-dash__tile {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.7rem 0.9rem;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  text-align: left;
}

#tp-speedcheck-dash .tp-dash__tile-label { color: #9aa4b2; font-size: 0.8rem; }
#tp-speedcheck-dash .tp-dash__tile-val { color: #ffffff; font-size: 1.15rem; font-weight: 700; }

/* Filmstrip = a time axis: one horizontal row that scrolls sideways for many
   frames, rather than wrapping into stacked rows. "safe center" centers a few
   frames but falls back to start-aligned (reachable) when they overflow. */
#tp-speedcheck-dash .tp-dash__strip {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  justify-content: safe center;
  margin-bottom: 1.1rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 6px;
  scrollbar-width: thin;
}

#tp-speedcheck-dash .tp-dash__strip:empty { display: none; }

/* Fixed thumbnail size; the row scrolls when there are more than fit. */
#tp-speedcheck-dash .tp-dash__frame-wrap {
  flex: 0 0 96px;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

/* Frames are 240x135 (16:9) — a 4:3 box cropped ~25% off each frame's width. */
#tp-speedcheck-dash .tp-dash__frame {
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: top center;
  background-repeat: no-repeat;
  background-color: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  overflow: hidden;
  cursor: zoom-in;
}

#tp-speedcheck-dash .tp-dash__frame-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#tp-speedcheck-dash .tp-dash__pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

#tp-speedcheck-dash .tp-dash__pill {
  padding: 0.4rem 0.9rem;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
  font-size: 0.9rem;
  color: #c7cdda;
}

#tp-speedcheck-dash .tp-dash__pill b { font-weight: 800; }

#tp-speedcheck-dash .tp-dash__summary {
  margin: 0 0 1.1rem;
  color: #c7cdda;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* ---------- Wide layout (the /wordpress-speedtest/ funnel page) ----------
   The box fills the container's content width and every block spans it. The
   order of the blocks is the message (evaluation before offer), so there is
   deliberately no two-column grid that could reorder them. */
#tp-speedcheck-dash.tp-speedcheck-dash--wide {
  max-width: none;
  margin: 0;
}

#tp-speedcheck-dash.tp-speedcheck-dash--wide .tp-speedcheck__result {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.15rem;
  text-align: left;
}

@media (min-width: 900px) {
  #tp-speedcheck-dash.tp-speedcheck-dash--wide .tp-speedcheck__result {
    padding: 2rem;
  }

  #tp-speedcheck-dash.tp-speedcheck-dash--wide .tp-dash__tiles {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }

  /* no horizontal scrolling needed at this width */
  #tp-speedcheck-dash.tp-speedcheck-dash--wide .tp-dash__strip {
    justify-content: center;
  }
}

/* The head stays centred; the evaluation below reads better left-aligned. */
#tp-speedcheck-dash.tp-speedcheck-dash--wide .tp-dash__gauge-wrap,
#tp-speedcheck-dash.tp-speedcheck-dash--wide .tp-dash__host,
#tp-speedcheck-dash.tp-speedcheck-dash--wide .tp-dash__meta,
#tp-speedcheck-dash.tp-speedcheck-dash--wide .tp-dash__pills {
  align-self: center;
  text-align: center;
}


/* Whatever ends up last carries no trailing gap into the card padding. */
#tp-speedcheck-dash .tp-speedcheck__result > *:last-child {
  margin-bottom: 0;
}

/* Base (narrow) layout: no --wide modifier — this is what the published
   /turbometrics/ page (post 9013) renders. There the result box stacks in a
   single narrow column instead of the wide flex layout, so these blocks need
   their own left alignment and spacing here instead of inheriting it from
   the wide layout's gap. */
#tp-speedcheck-dash .tp-dash__section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-align: left;
  margin-bottom: 1.5rem;
  counter-reset: tp-dash-rec;
}

#tp-speedcheck-dash .tp-dash__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #9aa4b2;
}

#tp-speedcheck-dash .tp-dash__count {
  margin: 0;
  color: #ffffff;
  font-size: 1.14rem;
  font-weight: 700;
}

/* ---- Problems: what was found, with the measured proof ---- */
#tp-speedcheck-dash .tp-dash__problems {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 0.6rem;
}

#tp-speedcheck-dash .tp-dash__problem {
  padding: 0.75rem 0.95rem;
  background: rgba(255, 255, 255, 0.04);
  border-left: 3px solid #ef4444;
  border-radius: 0 10px 10px 0;
}

#tp-speedcheck-dash .tp-dash__problem-title { margin: 0 0 0.25rem; color: #ffffff; font-weight: 650; }
#tp-speedcheck-dash .tp-dash__problem-msg { margin: 0; color: #c7cdda; font-size: 0.9rem; }

/* ---- Recommendations ---- */
#tp-speedcheck-dash .tp-dash__recs {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

#tp-speedcheck-dash .tp-dash__rec {
  padding: 0.7rem 0.9rem;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  /* Counted here but reset once on the shared .tp-dash__section ancestor
     (not on .tp-dash__recs, which exists twice — first readable, then
     gated — and would restart the numbering at 1 each time). */
  counter-increment: tp-dash-rec;
}

#tp-speedcheck-dash .tp-dash__rec-title { margin: 0 0 0.2rem; color: #ffffff; font-weight: 650; }
#tp-speedcheck-dash .tp-dash__rec-title::before {
  content: counter(tp-dash-rec) ".";
  margin-right: 0.4rem;
  color: #ff8a33;
  font-weight: 700;
}
#tp-speedcheck-dash .tp-dash__rec-msg { margin: 0; color: #c7cdda; font-size: 0.9rem; }

/* ---- The neutral measurement table ---- */
#tp-speedcheck-dash .tp-dash__opt-scroll { overflow-x: auto; }

#tp-speedcheck-dash .tp-dash__opt {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

#tp-speedcheck-dash .tp-dash__opt th,
#tp-speedcheck-dash .tp-dash__opt td {
  padding: 0.55rem 0.7rem 0.55rem 0;
  text-align: left;
  vertical-align: top;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

#tp-speedcheck-dash .tp-dash__opt thead th {
  border-top: 0;
  padding-top: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #9aa4b2;
}

#tp-speedcheck-dash .tp-dash__opt tbody th { color: #c7cdda; font-weight: 600; }

#tp-speedcheck-dash .tp-dash__opt-val { color: #ffffff; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
#tp-speedcheck-dash .tp-dash__opt tr.is-bad .tp-dash__opt-val { color: #ef4444; }
#tp-speedcheck-dash .tp-dash__opt tr.is-warn .tp-dash__opt-val { color: #eab308; }
#tp-speedcheck-dash .tp-dash__opt tr.is-good .tp-dash__opt-val { color: #22c55e; }
#tp-speedcheck-dash .tp-dash__opt-fix { color: #c7cdda; }
#tp-speedcheck-dash .tp-dash__opt-fix.is-done { color: #22c55e; }
#tp-speedcheck-dash .tp-dash__opt-note { margin: 0; color: #9aa4b2; font-size: 0.86rem; }
#tp-speedcheck-dash .tp-dash__more-note { margin: 0; color: #9aa4b2; font-size: 0.86rem; }

/* Below 640px the columns would be cut off, so each row becomes a card. */
@media (max-width: 640px) {
  #tp-speedcheck-dash .tp-dash__opt thead { display: none; }
  #tp-speedcheck-dash .tp-dash__opt,
  #tp-speedcheck-dash .tp-dash__opt tbody,
  #tp-speedcheck-dash .tp-dash__opt tr,
  #tp-speedcheck-dash .tp-dash__opt th,
  #tp-speedcheck-dash .tp-dash__opt td { display: block; width: 100%; }

  #tp-speedcheck-dash .tp-dash__opt tr {
    margin-bottom: 0.5rem;
    padding: 0.65rem 0.8rem;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
  }

  #tp-speedcheck-dash .tp-dash__opt th,
  #tp-speedcheck-dash .tp-dash__opt td { border-top: 0; padding: 0; }
  #tp-speedcheck-dash .tp-dash__opt tbody th { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.1em; color: #9aa4b2; }
}

/* ---- Hosting hint: only rendered when the measurement justifies it ---- */
#tp-speedcheck-dash .tp-dash__hint {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.9rem 1.05rem;
  border: 1px solid rgba(234, 179, 8, 0.45);
  border-radius: 10px;
  background: rgba(234, 179, 8, 0.09);
  text-align: left;
  margin-bottom: 1.5rem;
}

#tp-speedcheck-dash .tp-dash__hint-ico { color: #eab308; line-height: 1.4; }
#tp-speedcheck-dash .tp-dash__hint-title { margin: 0 0 0.15rem; color: #ffffff; font-weight: 700; }
#tp-speedcheck-dash .tp-dash__hint-text { margin: 0; color: #c7cdda; font-size: 0.9rem; }

#tp-speedcheck-dash .tp-speedcheck__honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---- Lead gate: first recommendation readable, the rest blurred ---- */
/* The first recommendation renders normally (a taste of real value); everything
   after it lives in .tp-dash__gated, blurred behind the overlay — the pull to
   give an email for the full report. */
#tp-speedcheck-dash .tp-dash__gated {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  min-height: 120px;
}

#tp-speedcheck-dash .tp-dash__gated .tp-dash__rec {
  filter: blur(4px);
  user-select: none;
  pointer-events: none;
}

#tp-speedcheck-dash .tp-dash__gate {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 1rem;
  text-align: center;
  background: linear-gradient(180deg, rgba(11, 15, 26, 0.35), rgba(11, 15, 26, 0.82));
}

#tp-speedcheck-dash .tp-dash__gate-lock { font-size: 1.6rem; }
#tp-speedcheck-dash .tp-dash__gate-line { color: #ffffff; font-weight: 700; font-size: 1.02rem; }
#tp-speedcheck-dash .tp-dash__gate-cta { color: #ff8a33; font-weight: 700; font-size: 0.9rem; }

/* ---- The offer block: one email, two options ---- */
#tp-speedcheck-dash .tp-dash__offer {
  padding: 1.15rem 1.2rem;
  background: linear-gradient(180deg, rgba(255, 115, 0, 0.16), rgba(255, 115, 0, 0.06));
  border: 1px solid rgba(255, 115, 0, 0.4);
  border-radius: 12px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

#tp-speedcheck-dash .tp-dash__offer-head { margin: 0; font-size: 1.16rem; font-weight: 800; color: #ffffff; }
#tp-speedcheck-dash .tp-dash__offer-sub { margin: 0; color: #dfe3ea; font-size: 0.93rem; line-height: 1.5; }

#tp-speedcheck-dash .tp-dash__lead-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

#tp-speedcheck-dash #tp-lead-email {
  width: 100%;
  padding: 0.8rem 0.95rem;
  font-size: 1rem;
  background: #ffffff;
  color: #0B0C10;
  border: 1px solid #0B0C10;
  border-radius: 6px;
}

/* The two choices sit side by side and carry their own explanation, so the
   block needs no introductory paragraph above them.
   Note the names: tp-dash__choice* is the form control, tp-dash__opt* is the
   measurement table. They must never share a class. */
#tp-speedcheck-dash .tp-dash__choices {
  border: 0;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 0.75rem;
}

/* The card headline already asks the question; the legend only labels the
   group for screen readers. */
#tp-speedcheck-dash .tp-dash__choices legend { padding: 0; }

#tp-speedcheck-dash .tp-dash__choice {
  display: block;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  cursor: pointer;
}

#tp-speedcheck-dash .tp-dash__choice.is-on {
  border-color: rgba(255, 115, 0, 0.55);
  background: rgba(255, 115, 0, 0.09);
}

#tp-speedcheck-dash .tp-dash__choice-t {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #ffffff;
  font-weight: 700;
}

#tp-speedcheck-dash .tp-dash__choice-t input { margin: 0; accent-color: #FF7300; }

#tp-speedcheck-dash .tp-dash__choice-d {
  display: block;
  margin: 0.3rem 0 0 1.6rem;
  color: #9aa4b2;
  font-size: 0.87rem;
  line-height: 1.45;
}

/* Field and button share one row; below 640px they stack. */
#tp-speedcheck-dash .tp-dash__lead-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
}

/* Grid items default to min-width:auto, so the button's nowrap label would
   push the whole row wider than the card on a phone. */
#tp-speedcheck-dash .tp-dash__lead-row > * { min-width: 0; }

@media (max-width: 640px) {
  #tp-speedcheck-dash .tp-dash__lead-row { grid-template-columns: 1fr; }
  #tp-speedcheck-dash #tp-lead-submit { white-space: normal; }
}

#tp-speedcheck-dash #tp-lead-submit {
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: 6px;
  background: #FF7300;
  color: #ffffff;
  cursor: pointer;
  white-space: nowrap;
}
#tp-speedcheck-dash #tp-lead-submit:hover { background: #e56700; }
#tp-speedcheck-dash #tp-lead-submit:disabled { opacity: 0.55; cursor: not-allowed; }

/* One reassuring line instead of a four-point grid: these are meant to be
   glanced at, not read. */
/* Sized to hold all five points on one line in the wide layout; it still
   wraps on narrow screens rather than overflowing. */
#tp-speedcheck-dash .tp-dash__trustline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem 0.85rem;
  margin: 0;
  color: #9aa4b2;
  font-size: 0.79rem;
}

#tp-speedcheck-dash .tp-dash__trust-item { white-space: nowrap; }

#tp-speedcheck-dash .tp-dash__trust-item::before {
  content: "✓";
  color: #22c55e;
  font-weight: 700;
  margin-right: 0.3rem;
}

/* Label a group for screen readers without taking up space. */
#tp-speedcheck-dash .tp-dash__sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

#tp-speedcheck-dash .tp-dash__fineprint { margin: 0; color: #9aa4b2; font-size: 0.78rem; line-height: 1.45; }
#tp-speedcheck-dash .tp-dash__fineprint a { color: #ff8a33; text-decoration: underline; }

#tp-speedcheck-dash .tp-dash__lead-msg { margin: 0.2rem 0 0; font-weight: 600; }
#tp-speedcheck-dash .tp-dash__lead-msg.is-err { color: #ffb4b4; }
#tp-speedcheck-dash .tp-dash__lead-msg.is-ok { color: #86efac; }
#tp-speedcheck-dash .tp-dash__lead-success { margin: 0; color: #ffffff; font-weight: 600; }








/* Shown instead of the offer block when the shortcode runs without
   capture="email" — that is the published /turbometrics/ page. */
#tp-speedcheck-dash .tp-dash__cta {
  display: inline-block;
  margin-bottom: 1.5rem;
  padding: 0.85rem 1.75rem;
  background: #FF7300;
  color: #ffffff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 700;
}

#tp-speedcheck-dash .tp-dash__cta:hover { background: #e56700; color: #ffffff; }
