/**
 * Product pages (Safar Studio, Passport Extractor): loaded only on single hm_product views,
 * after theme.css. Shared keyframes such as panelIn live in theme.css.
 */

/* ==========================================================================
   FLAGSHIP PRODUCT PAGE: Safar Studio (single-hm_product-safar-erp.php)
   ========================================================================== */

/* Screenshot frame (click to enlarge) */
.sf-shot {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  background: #E2E8F0;
  box-shadow: 0 30px 70px -28px rgba(11, 31, 58, 0.55), 0 0 0 1px rgba(11, 31, 58, 0.08);
  cursor: zoom-in;
}

.sf-shot img { display: block; width: 100%; height: auto; transition: transform 0.9s var(--ease-out); }

@media (hover: hover) {
  .sf-shot:hover img { transform: scale(1.02); }
}

/* Hero */
.sf-hero {
  --focus: var(--teal-bright);
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding-block: clamp(2.5rem, 1.5rem + 4vw, 5rem) clamp(4rem, 3rem + 5vw, 7rem);
  background: var(--navy);
  color: var(--on-dark);
}

.sf-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(56, 212, 223, 0.45), transparent);
}

.sf-hero-grid { display: grid; gap: clamp(3rem, 6vw, 4.5rem); align-items: center; }

@media (min-width: 1080px) {
  .sf-hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
}

.sf-product-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.5rem;
  padding: 0.4rem 1rem 0.4rem 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.85rem;
  font-weight: 600;
  color: #E2E8F0;
}

.sf-product-badge img {
  width: auto;
  height: 30px;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
}

.sf-product-badge em { font-style: normal; color: var(--gold-bright); }

.sf-title {
  margin: 0 0 1.5rem;
  font-size: clamp(2.2rem, 1.35rem + 3vw, 3.7rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: #fff;
}

.sf-sub {
  max-width: 38rem;
  margin: 0 0 2.25rem;
  font-size: clamp(1.05rem, 0.98rem + 0.35vw, 1.2rem);
  line-height: 1.65;
  color: var(--on-dark-muted);
}

.sf-hero .hero-ctas { margin-bottom: 2rem; }

.sf-hero-visual { position: relative; perspective: 1400px; }

.sf-stack {
  position: relative;
  max-width: 760px;
  margin-inline: auto;
  padding-block: 9% 7%;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  will-change: transform;
}

.sf-stack-front { position: relative; z-index: 2; transform: translateZ(40px); }
.sf-stack-front .sf-shot { box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.12); }

.sf-stack-back {
  position: absolute;
  width: 58%;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
  opacity: 0.55;
}

.sf-stack-back img { display: block; width: 100%; height: auto; }
.sf-stack-back--a { top: 0; left: -5%; transform: translateZ(-60px) rotate(-4deg); }
.sf-stack-back--b { right: -5%; bottom: 0; transform: translateZ(-40px) rotate(3deg); }

.sf-float {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.9rem 0.6rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(10, 27, 50, 0.93);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.7);
  font-size: clamp(0.72rem, 0.66rem + 0.25vw, 0.88rem);
  transform: translateZ(90px);
  animation: sfFloat 6s ease-in-out infinite;
}

.sf-float strong { display: block; font-family: var(--font-heading); font-size: 1em; line-height: 1.2; color: #fff; }
.sf-float small { display: block; font-size: 0.82em; color: var(--on-dark-muted); white-space: nowrap; }
.sf-float--a { top: 4%; right: 0; }
.sf-float--b { bottom: 2%; left: 2%; animation-delay: -2s; }
.sf-float--c { top: 40%; left: -2%; animation-delay: -4s; }

.sf-float-icon,
.sf-wifi-off {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 2.3em;
  height: 2.3em;
  border-radius: 10px;
  font-weight: 800;
}

.sf-float-icon--ok { background: rgba(34, 197, 94, 0.16); color: #4ADE80; }
.sf-float-icon--gold { background: rgba(229, 193, 88, 0.16); color: var(--gold-bright); font-size: 0.9em; }
.sf-wifi-off { background: rgba(248, 113, 113, 0.16); color: #F87171; }

@media (max-width: 599px) {
  .sf-float--c { top: 46%; left: 0; }
}

/* At a glance */
.sf-glance { padding-block: clamp(2.5rem, 2rem + 2vw, 3.5rem); border-bottom: 1px solid var(--border); background: var(--surface); }

.sf-glance-grid { display: grid; gap: 2rem; align-items: center; }

@media (min-width: 960px) {
  .sf-glance-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 4rem; }
}

.sf-glance-title { margin: 0 0 0.6rem; font-size: 1.35rem; }
.sf-glance-copy p { margin: 0; font-size: 1.04rem; line-height: 1.75; color: var(--muted); }
.sf-glance-copy strong { color: var(--ink); }

.sf-glance-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; margin: 0; }

.sf-glance-facts > div {
  display: flex;
  flex-direction: column-reverse;
  gap: 0.2rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
}

.sf-glance-facts dt { font-size: 0.78rem; color: var(--muted); }

.sf-glance-facts dd {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
}

/* Pain to solution */
.sf-pains { background: var(--bg); }

.sf-pain-grid { display: grid; gap: 1.25rem; }

@media (min-width: 680px) {
  .sf-pain-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1080px) {
  .sf-pain-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.sf-pain {
  padding: 1.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: transform 0.6s var(--ease-out), box-shadow 0.6s var(--ease-out);
}

@media (hover: hover) {
  .sf-pain:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
}

.sf-pain p { display: flex; align-items: flex-start; gap: 0.7rem; margin: 0; line-height: 1.55; }

.sf-pain .icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  margin-top: 0.05rem;
  padding: 5px;
  border-radius: 50%;
}

.sf-pain-problem {
  padding-bottom: 1rem;
  border-bottom: 1px dashed var(--border-strong);
  font-weight: 600;
  color: var(--muted);
}

.sf-pain-problem .icon { background: #FDE3D8; color: #B4441F; }
.sf-pain-fix { padding-top: 1rem; font-weight: 500; color: var(--ink); }
.sf-pain-fix .icon { background: var(--teal-tint); color: var(--teal-ink); }

/* Module tour tabs */
.sf-tour { background: var(--surface); }

.sf-tablist {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  padding-bottom: 0.4rem;
  overflow-x: auto;
  scrollbar-width: thin;
}

@media (min-width: 900px) {
  .sf-tablist { flex-wrap: wrap; overflow: visible; }
}

.sf-tab {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.5rem;
  min-height: 46px;
  padding: 0 1.1rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--surface);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--muted);
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.sf-tab:hover { border-color: var(--ink); color: var(--ink); }

.sf-tab.is-active { border-color: var(--navy); background: var(--navy); color: #fff; }
.sf-tab.is-active .icon { color: var(--teal-bright); }

.sf-panel {
  display: grid;
  gap: 2rem;
  align-items: center;
  padding: clamp(1.25rem, 1rem + 2vw, 2.5rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, var(--bg), #fff);
}

.sf-panel + .sf-panel { margin-top: 1.25rem; }
.js .sf-panel:not(.is-active) { display: none; }
.js .sf-panel.is-active { animation: panelIn 0.6s var(--ease-out); }

@media (min-width: 1024px) {
  .sf-panel { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 3rem; }
}

.sf-panel-copy h3 { margin: 1rem 0 1.25rem; font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.9rem); letter-spacing: -0.025em; }

.sf-key {
  display: inline-grid;
  place-items: center;
  min-width: 52px;
  height: 44px;
  padding: 0 0.75rem;
  border: 1px solid var(--border-strong);
  border-bottom-width: 4px;
  border-radius: 10px;
  background: #fff;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--ink);
}

/* Passport scanner spotlight */
.sf-scan { overflow: clip; background: var(--navy); color: var(--on-dark); --focus: var(--teal-bright); }
.sf-scan .section-title { color: #fff; }
.sf-scan .section-lead { color: var(--on-dark-muted); }

.sf-scan-grid { position: relative; display: grid; gap: 3rem; align-items: center; }

@media (min-width: 1024px) {
  .sf-scan-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4rem; }
}

.sf-scan-points { display: grid; gap: 1.25rem; margin: 2rem 0 0; padding: 0; list-style: none; }
.sf-scan-points li { display: flex; gap: 1rem; align-items: flex-start; color: var(--on-dark-muted); line-height: 1.6; }
.sf-scan-points strong { display: block; margin-bottom: 0.15rem; font-family: var(--font-heading); font-size: 1.05rem; color: #fff; }

.sf-scan-points span,
.sf-steps span {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(56, 212, 223, 0.5);
  border-radius: 50%;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--teal-bright);
}

.sf-passport {
  position: relative;
  max-width: 520px;
  margin-inline: auto;
  padding: 1.5rem;
  border-radius: 18px;
  background:
    repeating-radial-gradient(circle at 80% 20%, rgba(13, 110, 70, 0.07) 0 2px, transparent 2px 9px),
    linear-gradient(135deg, #F2F7EC, #E4EFDA);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.7), inset 0 0 0 1px rgba(13, 110, 70, 0.18);
  color: #1F3A2A;
  transform: rotate(-2deg);
}

.sf-passport-top { display: flex; gap: 1.25rem; margin-bottom: 1.25rem; }

.sf-passport-photo {
  flex-shrink: 0;
  width: 96px;
  height: 120px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 36%, #9DB49C 0 18%, transparent 19%),
    radial-gradient(ellipse 60% 40% at 50% 92%, #9DB49C 0 60%, transparent 61%),
    #D2E2C9;
}

.sf-passport-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem 1rem; align-content: start; }
.sf-field { display: block; line-height: 1.2; }
.sf-field:nth-child(2) { grid-column: 1 / -1; order: -1; }
.sf-field small { display: block; font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: #5C7A63; }
.sf-field b { font-family: var(--font-mono); font-size: 0.92rem; }

.sf-mrz {
  position: relative;
  display: grid;
  gap: 0.2rem;
  overflow: hidden;
  padding: 0.75rem 0.85rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.65);
  font-family: var(--font-mono);
  font-size: clamp(0.58rem, 0.42rem + 0.6vw, 0.82rem);
  letter-spacing: 0.06em;
  white-space: nowrap;
  color: #1F3A2A;
}

.sf-laser {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 46%, rgba(0, 224, 176, 0.35) 49%, #00E0B0 50%, rgba(0, 224, 176, 0.35) 51%, transparent 54%);
  animation: sfLaser 2.4s ease-in-out infinite;
}

.sf-passport-ok {
  position: absolute;
  right: 1rem;
  bottom: -1.1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-pill);
  background: #16A34A;
  box-shadow: 0 12px 26px -10px rgba(22, 163, 74, 0.7);
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
}

.js .sf-scan-visual:not(.is-visible) .sf-field,
.js .sf-scan-visual:not(.is-visible) .sf-passport-ok { opacity: 0; transform: translateY(6px); }

.sf-field,
.sf-passport-ok { transition: opacity 0.5s ease, transform 0.6s var(--ease-out); }
.sf-field { transition-delay: calc(var(--f) * 160ms + 500ms); }
.sf-passport-ok { transition-delay: 1.5s; }

/* Bento */
.sf-bento-section { background: var(--bg); }

.sf-bento { display: grid; gap: 1.25rem; grid-auto-flow: dense; }

@media (min-width: 720px) {
  .sf-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sf-cell--safe { grid-column: span 2; }
}

@media (min-width: 1080px) {
  .sf-bento { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.sf-cell {
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.sf-cell h3 { margin: 1.5rem 0 0.5rem; font-size: 1.2rem; }
.sf-cell p { margin: 0; font-size: 0.95rem; line-height: 1.65; color: var(--muted); }

.sf-keys { display: flex; gap: 0.4rem; }

.sf-keys span {
  display: grid;
  flex: 1;
  min-width: 0;
  padding: 0.45rem 0.25rem 0.55rem;
  border: 1px solid var(--border-strong);
  border-bottom-width: 4px;
  border-radius: 10px;
  background: #fff;
  font-size: 0.68rem;
  text-align: center;
  color: var(--muted);
  animation: sfKey 5s ease-in-out infinite;
  animation-delay: calc(var(--k) * 1s);
}

.sf-keys b { font-family: var(--font-mono); font-size: 1rem; color: var(--ink); }

.sf-lang {
  display: grid;
  gap: 0.5rem;
  padding: 1rem;
  border-radius: 14px;
  background: var(--bg);
}

.sf-lang span { padding: 0.55rem 0.8rem; border: 1px solid var(--border); border-radius: 10px; background: #fff; font-weight: 600; }
.sf-lang-ur { font-family: "Segoe UI", "Noto Naskh Arabic", Tahoma, sans-serif; font-size: 1.05rem; text-align: right; }
.sf-lang-en { animation: sfLangA 6s ease-in-out infinite; }
.sf-lang-ur { animation: sfLangB 6s ease-in-out infinite; }

.sf-offline { display: flex; gap: 1rem; align-items: center; padding: 1rem; border-radius: 14px; background: var(--bg); }

.sf-offline-wifi {
  position: relative;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: #FDE3D8;
  color: #B4441F;
}

.sf-offline-wifi i {
  position: absolute;
  width: 3px;
  height: 64%;
  border-radius: 2px;
  background: #B4441F;
  transform: rotate(45deg);
}

.sf-offline-saves { display: grid; gap: 0.35rem; font-size: 0.78rem; }

.sf-offline-saves b {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  color: var(--ink);
  animation: sfSave 6s ease-in-out infinite;
}

.sf-offline-saves b::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #22C55E; }
.sf-offline-saves b:nth-child(2) { animation-delay: 0.6s; }
.sf-offline-saves b:nth-child(3) { animation-delay: 1.2s; }

.sf-cell--safe { display: grid; gap: 1.5rem; align-items: center; }

@media (min-width: 720px) {
  .sf-cell--safe { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
  .sf-cell--safe h3 { margin-top: 0; }
}

.sf-lock-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: var(--navy);
  color: var(--gold-bright);
}

.sf-lock-icon::after {
  content: "";
  position: absolute;
  inset: -6px;
  border: 2px solid rgba(201, 162, 39, 0.4);
  border-radius: 24px;
  animation: sfRing 2.6s ease-out infinite;
}

/* All features */
.sf-all { background: var(--surface); }

.sf-feature-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 768px) {
  .sf-feature-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1080px) {
  .sf-feature-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.sf-feature-list li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
}

.sf-feature-list .icon { color: var(--teal-ink); }

/* Comparison table */
.sf-compare { background: var(--bg); }

.sf-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.sf-table { width: 100%; min-width: 680px; border-collapse: collapse; font-size: 0.95rem; }

.sf-table th,
.sf-table td { padding: 1rem 1.1rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }

.sf-table tbody tr:last-child th,
.sf-table tbody tr:last-child td { border-bottom: 0; }

.sf-table thead th { font-family: var(--font-heading); font-size: 1rem; color: var(--ink); }
.sf-table tbody th { font-weight: 600; color: var(--ink); }
.sf-table td { color: var(--muted); }
.sf-table td span { vertical-align: middle; }
.sf-table .icon { display: inline-block; margin-right: 0.4rem; vertical-align: middle; }
.sf-table .is-us { background: var(--teal-tint); }
.sf-table thead .is-us { color: var(--teal-ink-hover); }
.sf-cell-yes { font-weight: 600; color: var(--ink) !important; }
.sf-cell-yes .icon { color: var(--teal-ink); }
.sf-cell-no .icon { color: #B4441F; }

/* Pricing */
.sf-pricing { background: var(--surface); }

.sf-plans { display: grid; gap: 1.5rem; align-items: stretch; }

@media (min-width: 1024px) {
  .sf-plans { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.sf-plan {
  display: flex;
  flex-direction: column;
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
}

.sf-plan-tag { margin: 0 0 0.5rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal-ink); }
.sf-plan h3 { margin: 0 0 1rem; font-size: 1.35rem; }
.sf-plan-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem; margin: 0 0 1rem; }
.sf-plan-price strong { font-family: var(--font-heading); font-size: 2.2rem; line-height: 1; letter-spacing: -0.03em; color: var(--ink); }
.sf-plan-price span { font-size: 0.88rem; color: var(--muted); }

.sf-plan-options {
  display: grid;
  gap: 0.35rem;
  margin: 0 0 1rem;
  padding: 0 0 1rem;
  border-bottom: 1px solid var(--border);
  list-style: none;
  font-size: 0.86rem;
  color: var(--muted);
}

.sf-plan-options li::before { content: "\2022"; margin-right: 0.5rem; color: var(--teal); }

.sf-plan-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1.25rem; }

.sf-plan-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-pill);
  background: var(--bg);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
}

.sf-plan-features { display: grid; gap: 0.65rem; margin: 0 0 1.75rem; padding: 0; list-style: none; flex: 1; }
.sf-plan-features li { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.93rem; color: var(--ink); }
.sf-plan-features .icon { flex-shrink: 0; margin-top: 0.2rem; color: var(--teal-ink); }
.sf-plan-features .is-missing { color: var(--muted); text-decoration: line-through; }
.sf-plan-features .is-missing .icon { color: #B4441F; }

.sf-plan--featured {
  --focus: var(--teal-bright);
  --glow: rgba(56, 212, 223, 0.12);
  --glow-edge: rgba(56, 212, 223, 0.7);
  border-color: transparent;
  background: radial-gradient(420px 280px at 100% 0%, rgba(0, 166, 176, 0.3), transparent 70%), var(--navy);
  box-shadow: var(--shadow-lg);
  color: var(--on-dark);
}

@media (min-width: 1024px) {
  .sf-plan--featured { transform: translateY(-14px); }
}

.sf-plan--featured .sf-plan-tag { color: var(--gold-bright); }
.sf-plan--featured h3,
.sf-plan--featured .sf-plan-price strong,
.sf-plan--featured .sf-plan-features li { color: #fff; }
.sf-plan--featured .sf-plan-price span,
.sf-plan--featured .sf-plan-options { color: var(--on-dark-muted); }
.sf-plan--featured .sf-plan-options { border-color: rgba(255, 255, 255, 0.12); }
.sf-plan--featured .sf-plan-meta span { background: rgba(255, 255, 255, 0.08); color: #fff; }
.sf-plan--featured .sf-plan-features .icon { color: var(--teal-bright); }

.sf-pricing-note { margin: 2rem 0 0; text-align: center; color: var(--muted); }

/* Affiliate */
.sf-affiliate { background: var(--bg); }

.sf-aff-card {
  --focus: var(--teal-bright);
  position: relative;
  isolation: isolate;
  display: grid;
  gap: 2.5rem;
  overflow: hidden;
  padding: clamp(1.75rem, 1rem + 3vw, 4rem);
  border-radius: clamp(1.5rem, 1rem + 1.5vw, 2.25rem);
  background: var(--navy);
  color: var(--on-dark);
}

@media (min-width: 1024px) {
  .sf-aff-card { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); align-items: center; }
}

.sf-aff-copy h2 { margin: 0 0 1rem; font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3rem); line-height: 1.08; letter-spacing: -0.035em; color: #fff; }
.sf-aff-copy > p:not(.eyebrow) { margin: 0 0 1.5rem; line-height: 1.7; color: var(--on-dark-muted); }

.sf-aff-perks { display: grid; gap: 0.6rem; margin: 0 0 2rem; padding: 0; list-style: none; }

@media (min-width: 640px) {
  .sf-aff-perks { grid-template-columns: 1fr 1fr; }
}

.sf-aff-perks li { display: flex; align-items: center; gap: 0.55rem; font-weight: 500; color: #E2E8F0; }
.sf-aff-perks .icon { color: var(--teal-bright); }

.sf-calc {
  --focus: var(--teal-ink);
  display: grid;
  gap: 0.6rem;
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6);
  color: var(--text);
}

.sf-calc h3 { margin: 0 0 0.5rem; font-size: 1.2rem; }
.sf-calc label { margin-top: 0.4rem; font-size: 0.88rem; font-weight: 600; color: var(--ink); }
.sf-calc output { font-family: var(--font-heading); color: var(--teal-ink); }
.sf-calc input[type="range"] { width: 100%; accent-color: var(--teal-ink); }

.sf-calc-result {
  margin: 0.75rem 0 0;
  padding: 1rem;
  border-radius: 12px;
  background: var(--teal-tint);
  font-weight: 600;
  color: var(--ink);
}

.sf-calc-result strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 2rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--teal-ink-hover);
}

.sf-calc-note { margin: 0; font-size: 0.8rem; color: var(--muted); }

/* Getting started */
.sf-start { background: var(--surface); }

.sf-start-grid { display: grid; gap: 3rem; align-items: start; }

@media (min-width: 1024px) {
  .sf-start-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4rem; }
}

.sf-steps { display: grid; gap: 1.25rem; margin: 2rem 0 0; padding: 0; list-style: none; }
.sf-steps li { display: flex; gap: 1rem; align-items: flex-start; line-height: 1.6; color: var(--muted); }
.sf-steps strong { display: block; font-family: var(--font-heading); font-size: 1.05rem; color: var(--ink); }
.sf-steps span { border-color: var(--teal); color: var(--teal-ink); }

.sf-req {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--bg);
}

.sf-req h3 { margin: 1.5rem 0 1rem; font-size: 1.2rem; }
.sf-req-list { display: grid; gap: 0.75rem; margin: 0; }
.sf-req-list div { display: grid; gap: 0.15rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--border); }
.sf-req-list div:last-child { border-bottom: 0; padding-bottom: 0; }
.sf-req-list dt { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.sf-req-list dd { margin: 0; font-weight: 500; color: var(--ink); }

/* Lightbox */
.sf-lightbox {
  width: min(1400px, 94vw);
  max-width: none;
  max-height: 94vh;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 14px;
  background: transparent;
}

.sf-lightbox::backdrop { background: rgba(6, 17, 31, 0.86); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.sf-lightbox img { display: block; width: 100%; height: auto; max-height: 86vh; object-fit: contain; border-radius: 12px; box-shadow: 0 40px 100px -30px #000; }
.sf-lightbox-caption { margin: 0.75rem 0 0; text-align: center; font-size: 0.92rem; color: #E2E8F0; }

.sf-lightbox-close {
  position: absolute;
  top: -18px;
  right: -18px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 10px 30px -10px #000;
  cursor: pointer;
}

@media (max-width: 599px) {
  .sf-lightbox-close { top: -54px; right: 0; }
}

/* ==========================================================================
   PRODUCT PAGE: Passport Extractor (single-hm_product-passport-extractor.php)
   Reuses the sf- product components above; only what differs lives here.
   ========================================================================== */
.pe-on-bg { background: var(--bg); }
.pe-on-surface { background: var(--surface); }

.pe-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #3B76E0, #1F4FA3);
  color: #fff;
}

.pe-float-icon--warn { background: rgba(250, 204, 21, 0.16); color: #FACC15; font-family: var(--font-mono); font-size: 0.85em; }

.pe-tab-n {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg);
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
}

.sf-tab.is-active .pe-tab-n { background: var(--teal-bright); color: var(--navy); }

/* Accuracy: engine readings board */
.pe-board { display: grid; gap: 1rem; max-width: 520px; margin-inline: auto; }

.pe-field {
  padding: 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 30px 60px -36px rgba(0, 0, 0, 0.8);
}

.pe-field-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.85rem; }

.pe-field-head span {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
}

.pe-field-head img { display: block; width: auto; max-width: 100%; height: 40px; border-radius: 6px; }

.pe-reads { display: grid; gap: 0.4rem; margin: 0; padding: 0; list-style: none; }

.pe-reads li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
}

.pe-reads small { min-width: 5.6rem; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; color: var(--on-dark-muted); }
.pe-reads b { font-family: var(--font-mono); font-size: 0.92rem; letter-spacing: 0.04em; color: #fff; }

.pe-reads em {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 600;
  color: #4ADE80;
}

.pe-reads mark,
.pe-diff mark { padding: 0 2px; border-radius: 3px; background: #FDE68A; color: #6B3F00; }

.pe-verdict {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin: 0.85rem 0 0;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.84rem;
  font-weight: 700;
}

.pe-verdict small { font-weight: 500; opacity: 0.85; }
.pe-verdict--ok { background: #16A34A; color: #fff; }
.pe-verdict--review { background: #FBBF24; color: #3B2600; }

.pe-reads li,
.pe-verdict { transition: opacity 0.45s ease, transform 0.6s var(--ease-out); }
.pe-reads li { transition-delay: calc(var(--r) * 180ms + 350ms); }
.pe-field--ok .pe-verdict { transition-delay: 0.95s; }
.pe-field--review .pe-verdict { transition-delay: 1.5s; }

.js .pe-board-wrap:not(.is-visible) .pe-reads li,
.js .pe-board-wrap:not(.is-visible) .pe-verdict { opacity: 0; transform: translateX(-8px); }

.pe-specimen-note { margin: 0.9rem 0 0; text-align: center; font-size: 0.75rem; color: var(--on-dark-muted); }

.pe-stats { position: relative; display: grid; gap: 1rem; margin: clamp(3rem, 2rem + 3vw, 4.5rem) 0 0; }

@media (min-width: 720px) {
  .pe-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.pe-stats div {
  display: flex;
  flex-direction: column-reverse;
  gap: 0.3rem;
  padding: 1.25rem 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.pe-stats dt { font-size: 0.9rem; color: var(--on-dark-muted); }

.pe-stats dd {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(2rem, 1.6rem + 1.4vw, 2.75rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--teal-bright);
}

.pe-stats-note { position: relative; max-width: 62rem; margin: 1rem 0 0; font-size: 0.86rem; line-height: 1.6; color: var(--on-dark-muted); }

/* Bento visuals */
.pe-keys b { font-size: 0.8rem; white-space: nowrap; }

.pe-diff { display: grid; gap: 0.5rem; padding: 1rem; border-radius: 14px; background: var(--bg); }

.pe-diff span {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.pe-diff small {
  padding: 0.1rem 0.4rem;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--muted);
}

.pe-types { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 1rem 0 0; padding: 0; list-style: none; }

.pe-types li {
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink);
}

.pe-perf { display: grid; gap: 0.45rem; padding: 1rem; border-radius: 14px; background: var(--bg); }

.pe-perf span {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
}

.pe-perf span::before {
  content: "";
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  border: 2px solid var(--border-strong);
  border-radius: 50%;
}

.pe-perf .is-on { border-color: var(--teal); color: var(--ink); }
.pe-perf .is-on::before { border-color: var(--teal-ink); background: radial-gradient(circle, var(--teal-ink) 0 3px, transparent 3.5px); }

/* Export + fields */
.pe-export { background: var(--surface); }

.pe-export-grid { display: grid; gap: 3rem; align-items: center; }

@media (min-width: 1024px) {
  .pe-export-grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 4rem; }
}

.pe-formats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; margin: 1.75rem 0 1.25rem; padding: 0; list-style: none; }

.pe-formats li { padding: 0.8rem 1rem; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); }
.pe-formats strong { display: block; font-family: var(--font-heading); font-size: 0.98rem; color: var(--ink); }
.pe-formats span { display: block; margin-top: 0.15rem; font-size: 0.82rem; line-height: 1.45; color: var(--muted); }

.pe-presets { margin: 0; font-size: 0.93rem; line-height: 1.65; color: var(--muted); }
.pe-presets strong { color: var(--ink); }

.pe-fields { margin-top: clamp(3.5rem, 2.5rem + 4vw, 5.5rem); }
.pe-fields-title { margin: 0 0 1.5rem; font-size: clamp(1.3rem, 1.15rem + 0.6vw, 1.65rem); text-align: center; }
.pe-derived { border-style: dashed !important; background: var(--teal-tint) !important; }

@media (min-width: 1080px) {
  .pe-derived { grid-column: span 3; }
}

/* Who it's for */
.pe-who { display: grid; gap: 1.25rem; }

@media (min-width: 680px) {
  .pe-who { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1080px) {
  .pe-who { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.pe-who-card { padding: 1.6rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }

.pe-who-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--teal-tint);
  color: var(--teal-ink);
}

.pe-who-card h3 { margin: 1.1rem 0 0.4rem; font-size: 1.1rem; }
.pe-who-card p { margin: 0; font-size: 0.93rem; line-height: 1.6; color: var(--muted); }
.pe-who-links { margin: 2rem 0 0; text-align: center; color: var(--muted); }
.pe-who-links a { font-weight: 600; color: var(--teal-ink); text-decoration: underline; text-underline-offset: 3px; }

/* Product keyframes */
@keyframes sfFloat {
  0%, 100% { transform: translateZ(90px) translateY(0); }
  50% { transform: translateZ(90px) translateY(-8px); }
}

@keyframes sfLaser {
  0%, 100% { transform: translateY(-50%); }
  50% { transform: translateY(50%); }
}

@keyframes sfKey {
  0%, 16%, 100% { transform: none; }
  6% { transform: translateY(3px) scale(0.96); }
}

@keyframes sfLangA {
  0%, 45%, 100% { opacity: 1; }
  55%, 90% { opacity: 0.35; }
}

@keyframes sfLangB {
  0%, 45%, 100% { opacity: 0.35; }
  55%, 90% { opacity: 1; }
}

@keyframes sfSave {
  0%, 8% { opacity: 0; transform: translateX(-6px); }
  16%, 85% { opacity: 1; transform: none; }
  100% { opacity: 0; }
}

@keyframes sfRing {
  0% { opacity: 0.9; transform: scale(0.9); }
  100% { opacity: 0; transform: scale(1.25); }
}
