/* Help & Support page (/contact/; supportPage: true) — loaded only there, on top of
   style.css (tokens: --ink, --accent, --border, --surface-alt …).
   A light portal at the top: the Pool Robot Experts' faces, one ask box, and a stage
   whose views swap in place (home / fix / setup) with no scrolling. Then the form.
   Same pattern as poolexpress.com (/contact-us) and premierrobotic.com (/contact). */

/* ---- The welcome: light, warm, centred — the faces first. ---- */
.sp-hero {
  background: linear-gradient(180deg, #ffffff 0%, #f5f5f7 100%);
  color: var(--ink, #1d1d1f);
  padding: 22px 0 clamp(40px, 6vw, 72px);
}

.sp-crumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--ink-muted, #86868b);
}

.sp-crumbs a {
  color: var(--ink-secondary, #6e6e73);
  text-decoration: none;
  transition: color 0.2s ease;
}

.sp-crumbs a:hover { color: var(--ink, #1d1d1f); }
.sp-crumbs svg { color: var(--ink-faint, #a1a1a6); }
.sp-crumbs span { color: var(--ink, #1d1d1f); font-weight: 500; }

.sp-portal {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 920px;
  margin: clamp(14px, 3vw, 30px) auto 0;
}

.sp-faces {
  display: flex;
  justify-content: center;
}

.sp-faces img,
.sp-faces picture img {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 28%;
  border: 4px solid #fff;
  margin-left: -18px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  background: var(--surface-alt, #f5f5f7);
}

.sp-faces > :first-child,
.sp-faces > :first-child img { margin-left: 0; }

.sp-welcome-line {
  margin: 14px 0 4px;
  color: var(--ink-secondary, #6e6e73);
  font-size: 15px;
  line-height: 1.5;
}

.sp-welcome-line strong {
  color: var(--ink, #1d1d1f);
  font-weight: 600;
  font-size: 16px;
}

.sp-online {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--green, #0f7a43);
}

.sp-online::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #30d158;
  box-shadow: 0 0 0 3px rgba(48, 209, 88, 0.2);
}

.sp-portal h1 {
  margin: 0.35em 0 0.3em;
  font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink, #1d1d1f);
}

/* ask anything */
.sp-ask {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  max-width: 640px;
  margin: 1.1rem auto 0;
  padding: 6px 6px 6px 18px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border-strong, #d2d2d7);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.sp-ask:focus-within {
  border-color: var(--accent, #0071e3);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.14), 0 10px 30px rgba(0, 0, 0, 0.05);
}

.sp-ask input {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 10px 0;
  border: none;
  background: transparent;
  color: var(--ink, #1d1d1f);
  font: inherit;
  font-size: 16px;
  outline: none;
  box-shadow: none;
}

.sp-ask input::placeholder { color: var(--ink-muted, #86868b); }

.sp-ask .btn { margin: 0; flex: none; min-height: 42px; padding: 0 20px; }

/* ---- The stage: answers in place ---- */
.sp-stage {
  width: 100%;
  margin-top: 1.1rem;
  min-height: 236px;
}

.sp-view[hidden] { display: none; }

.sp-view { animation: sp-rise 0.3s cubic-bezier(0.4, 0, 0.2, 1); }

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

.sp-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.sp-action {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 104px;
  padding: 14px 12px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--border, #e8e8ed);
  color: var(--ink, #1d1d1f);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.sp-action:hover,
.sp-action:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(0, 113, 227, 0.5);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.07);
  outline: none;
}

.sp-action svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: var(--accent, #0071e3);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sp-action--accent {
  background: var(--accent, #0071e3);
  border-color: var(--accent, #0071e3);
  color: #fff;
}

.sp-action--accent svg { stroke: #fff; }

.sp-action--accent:hover,
.sp-action--accent:focus-visible {
  background: var(--accent-hover, #0077ed);
  border-color: var(--accent-hover, #0077ed);
}

.sp-reach {
  margin: 16px 0 0;
  color: var(--ink-secondary, #6e6e73);
  font-size: 14.5px;
}

.sp-reach a {
  color: var(--accent-deep, #0066cc);
  font-weight: 600;
  text-decoration: none;
}

.sp-reach a:hover { text-decoration: underline; }

.sp-view-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  text-align: left;
}

.sp-view-head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--ink, #1d1d1f);
}

.sp-back {
  appearance: none;
  border: 1px solid var(--border, #e8e8ed);
  background: #fff;
  color: var(--ink, #1d1d1f);
  border-radius: 999px;
  padding: 7px 13px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  flex: none;
}

.sp-back:hover { background: var(--surface-alt, #f5f5f7); }

.sp-symptoms {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  text-align: left;
}

.sp-symptom {
  appearance: none;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--border, #e8e8ed);
  color: var(--ink, #1d1d1f);
  font: inherit;
  font-size: 14.5px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.sp-symptom:hover,
.sp-symptom:focus-visible {
  border-color: rgba(0, 113, 227, 0.5);
  outline: none;
}

.sp-symptom[aria-pressed="true"] {
  border-color: var(--accent, #0071e3);
  background: var(--accent-tint, #eaf2fb);
  color: var(--accent-deep, #0066cc);
}

.sp-steps {
  margin-top: 12px;
  padding: 16px 18px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--border, #e8e8ed);
  text-align: left;
  color: var(--ink-body, #424245);
  font-size: 15px;
  line-height: 1.5;
}

.sp-steps[hidden] { display: none; }

.sp-steps h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink, #1d1d1f);
}

.sp-steps ol {
  margin: 0 0 10px;
  padding-left: 20px;
}

.sp-steps li { margin: 5px 0; }

.sp-steps li::marker {
  color: var(--accent, #0071e3);
  font-weight: 600;
}

.sp-steps--open { margin-top: 0; }

.sp-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.sp-link-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid var(--border, #e8e8ed);
  background: var(--surface-alt, #f5f5f7);
  color: var(--ink, #1d1d1f);
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}

.sp-link-btn:hover {
  background: #e8e8ed;
  color: var(--ink, #1d1d1f);
  text-decoration: none;
}

.sp-link-btn--accent {
  background: var(--accent-tint, #eaf2fb);
  border-color: var(--accent-tint-border, #c8dff5);
  color: var(--accent-deep, #0066cc);
}

.sp-link-btn--accent:hover { background: var(--accent-tint-strong, #ddebf8); color: var(--accent-deep, #0066cc); }

.sp-note {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface-alt, #f5f5f7);
  border: 1px solid var(--border, #e8e8ed);
  color: var(--ink-body, #424245);
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
}

.sp-inline-link {
  appearance: none;
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  color: var(--accent-deep, #0066cc);
  font-weight: 600;
  cursor: pointer;
}

/* The form section sits right under the portal. */
.sp-form-section { padding: clamp(40px, 6vw, 64px) 0 clamp(48px, 7vw, 80px); }
.sp-form-section .contact-form-section { margin-top: 0; }

@media (max-width: 767.98px) {
  .sp-faces img,
  .sp-faces picture img {
    width: 64px;
    height: 64px;
    margin-left: -14px;
    border-width: 3px;
  }

  .sp-ask { padding-left: 14px; }

  .sp-ask input { font-size: 16px; }

  .sp-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .sp-actions > .sp-action:last-child:nth-child(odd) { grid-column: 1 / -1; }

  .sp-action {
    min-height: 92px;
    font-size: 13.5px;
  }

  .sp-symptoms { grid-template-columns: 1fr; }
}

/* ================================================================================
   2026-11-02 round 2 — the order tools ON the page, the topic cards, reach-us
   ================================================================================ */

/* The tool / result views: a narrower column so the form and the card read well. */
.sp-view--narrow { max-width: 640px; margin-left: auto; margin-right: auto; }

/* The on-page form (pr-contact.js builds it). */
.sp-form {
  padding: 18px 18px 14px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--border, #e8e8ed);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  text-align: left;
}
.sp-form-text { margin: 0 0 12px; font-size: 14.5px; line-height: 1.5; color: var(--ink-body, #424245); }
.sp-form-fields { display: grid; gap: 8px; }
.sp-form input,
.sp-form textarea {
  width: 100%;
  margin: 0;
  padding: 11px 13px;
  border: 1px solid var(--border-strong, #d2d2d7);
  border-radius: 11px;
  background: #fff;
  color: var(--ink, #1d1d1f);
  font: inherit;
  font-size: 16px;
  box-shadow: none;
  box-sizing: border-box;
}
.sp-form input:focus,
.sp-form textarea:focus { outline: none; border-color: var(--accent, #0071e3); box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.14); }
.sp-form textarea { margin-top: 8px; resize: vertical; min-height: 64px; }
.sp-seg { display: inline-flex; gap: 4px; margin: 10px 0 8px; padding: 4px; border-radius: 999px; background: var(--surface-alt, #f5f5f7); }
.sp-seg-btn {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 7px 14px;
  border-radius: 999px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-secondary, #6e6e73);
  cursor: pointer;
}
.sp-seg-btn[aria-pressed="true"] { background: #fff; color: var(--ink, #1d1d1f); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12); }
.sp-form-err { min-height: 18px; margin: 8px 0 0; font-size: 13.5px; color: var(--red, #e30000); }
.sp-form .sp-row { margin-top: 10px; align-items: center; }
.sp-form-submit.btn { min-height: 44px; padding: 0 22px; }
.sp-form-fine { margin: 12px 0 0; font-size: 12.5px; color: var(--ink-muted, #86868b); }

/* The answer card. */
.sp-result-who { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 13.5px; color: var(--ink-secondary, #6e6e73); text-align: left; }
.sp-result-who img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; object-position: 50% 28%; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.14); }
.sp-card {
  padding: 16px 18px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--border, #e8e8ed);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  text-align: left;
}
.sp-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.sp-card-title { font-size: 16px; font-weight: 600; color: var(--ink, #1d1d1f); }
.sp-pill { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--accent-tint, #eaf2fb); color: var(--accent-deep, #0066cc); white-space: nowrap; }
.sp-pill.good { background: var(--green-tint, #e8f4ec); color: var(--green, #0f7a43); }
.sp-pill.warn { background: var(--amber-tint, #fcf3e2); color: var(--amber, #b45309); }
.sp-pill.muted { background: var(--surface-alt, #f5f5f7); color: var(--ink-secondary, #6e6e73); }
.sp-card-body { margin-top: 8px; font-size: 14.5px; line-height: 1.5; color: var(--ink-body, #424245); }
.sp-card-sub { color: var(--ink, #1d1d1f); }
.sp-card-note { margin-top: 6px; color: var(--ink-body, #424245); }
.sp-ship { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border, #e8e8ed); }
.sp-ship-carrier { font-weight: 600; color: var(--ink, #1d1d1f); }
.sp-ship-track b { font-weight: 600; }
.sp-muted { color: var(--ink-muted, #86868b); }
.sp-card-link { color: var(--accent-deep, #0066cc); font-weight: 600; text-decoration: none; }
.sp-card-link:hover { text-decoration: underline; }
.sp-card-links { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; }
.sp-card-phone { color: var(--ink, #1d1d1f); font-weight: 600; }
.sp-result-note { margin: 12px 0 0; font-size: 14px; color: var(--ink-body, #424245); text-align: left; }
.sp-view--narrow .sp-row { margin-top: 12px; }

/* ---- Browse by topic ---- */
.sp-section-head { text-align: center; max-width: 640px; margin: 0 auto clamp(20px, 3vw, 32px); }
.sp-section-head h2 { margin: 0 0 8px; font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.1rem); font-weight: 700; letter-spacing: -0.02em; color: var(--ink, #1d1d1f); }
.sp-section-head p { margin: 0; font-size: 15.5px; line-height: 1.5; color: var(--ink-secondary, #6e6e73); }
.sp-topics-section { padding: clamp(40px, 6vw, 72px) 0 clamp(24px, 4vw, 40px); background: #fff; }
.sp-topics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.sp-topic {
  display: flex;
  flex-direction: column;
  padding: 20px 20px 16px;
  border-radius: 18px;
  background: var(--surface-near, #fbfbfd);
  border: 1px solid var(--border, #e8e8ed);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.sp-topic:hover { border-color: var(--accent-tint-border, #c8dff5); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.06); transform: translateY(-2px); }
.sp-topic-head { display: flex; align-items: center; gap: 10px; }
.sp-topic-head svg { width: 26px; height: 26px; fill: none; stroke: var(--accent, #0071e3); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sp-topic-head h3 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink, #1d1d1f); }
.sp-topic-q { margin: 6px 0 10px; font-size: 13.5px; font-style: italic; color: var(--ink-muted, #86868b); }
.sp-topic-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.sp-topic-list a,
.sp-topic-list button {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--ink, #1d1d1f);
  font: inherit;
  font-size: 14.5px;
  line-height: 1.35;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.sp-topic-list a::after,
.sp-topic-list button::after { content: "→"; color: var(--accent, #0071e3); font-weight: 600; flex: none; opacity: 0.7; }
.sp-topic-list a:hover,
.sp-topic-list button:hover,
.sp-topic-list a:focus-visible,
.sp-topic-list button:focus-visible { background: var(--accent-tint, #eaf2fb); color: var(--accent-deep, #0066cc); outline: none; }
.sp-topic-fact { margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--border, #e8e8ed); font-size: 13px; line-height: 1.5; color: var(--ink-secondary, #6e6e73); }
.sp-topic-fact a { color: var(--accent-deep, #0066cc); font-weight: 600; text-decoration: none; white-space: nowrap; }
.sp-topic-fact a:hover { text-decoration: underline; }

/* ---- Other ways to reach us ---- */
.sp-reach-section { padding: clamp(24px, 4vw, 40px) 0 clamp(8px, 2vw, 16px); background: #fff; }
.sp-reach-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.sp-reach-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 18px;
  border-radius: 16px;
  background: var(--surface-alt, #f5f5f7);
  border: 1px solid transparent;
  color: var(--ink, #1d1d1f);
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.sp-reach-card svg { width: 24px; height: 24px; fill: none; stroke: var(--accent, #0071e3); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.sp-reach-card strong { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.sp-reach-card span { font-size: 13.5px; line-height: 1.4; color: var(--ink-secondary, #6e6e73); }
a.sp-reach-card:hover { background: var(--accent-tint, #eaf2fb); border-color: var(--accent-tint-border, #c8dff5); color: var(--ink, #1d1d1f); transform: translateY(-2px); text-decoration: none; }
.sp-reach-card--accent { background: var(--accent, #0071e3); color: #fff; }
.sp-reach-card--accent svg { stroke: #fff; }
.sp-reach-card--accent span { color: rgba(255, 255, 255, 0.82); }
a.sp-reach-card--accent:hover { background: var(--accent-hover, #0077ed); border-color: transparent; color: #fff; }
.sp-reach-card--static { cursor: default; }

@media (max-width: 991.98px) {
  .sp-topics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sp-reach-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 639.98px) {
  .sp-topics { grid-template-columns: 1fr; }
  .sp-reach-grid { grid-template-columns: 1fr; }
  .sp-form { padding: 14px; }
  .sp-form .sp-row .btn { width: 100%; }
}
