/* ── Policy Finder — royal blue & gold theme ── */

body:has(.page--finder) .bond-site-header {
  max-width: 560px;
  border-bottom-color: #3949ab;
}

body:has(.page--finder) {
  background: linear-gradient(180deg, #e8eaf6 0%, #f8fafc 180px, #f1f5f9 100%);
}

.page--finder {
  --pf-accent: #3949ab;
  --pf-accent-dark: #1a237e;
  --pf-accent-light: #5c6bc0;
  --pf-accent-soft: #e8eaf6;
  --pf-accent-glow: rgba(57, 73, 171, 0.18);
  --pf-gold: #ffb300;
  --pf-success: #059669;
  --pf-success-soft: #ecfdf5;
}

.page--finder .main {
  max-width: 560px;
  margin-top: -1.25rem;
}

.page--finder .hero.hero--finder {
  padding: 2.5rem 1.25rem 3.5rem;
  overflow: hidden;
  background: linear-gradient(160deg, #0c1445 0%, #1a237e 32%, #283593 55%, #3949ab 100%);
  text-align: center;
}

.page--finder .hero.hero--finder::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% -10%, rgba(255, 193, 7, 0.18) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 100% 100%, rgba(92, 107, 192, 0.35) 0%, transparent 55%);
  pointer-events: none;
}

.page--finder .hero.hero--finder::after {
  height: 36px;
  border-radius: 36px 36px 0 0;
  background: linear-gradient(180deg, #e8eaf6 0%, #f8fafc 100%);
}

.hero-finder-head {
  position: relative;
  z-index: 1;
  max-width: 26rem;
  margin: 0 auto;
}

.hero-finder-h1 {
  margin: 0;
  font-size: clamp(1.45rem, 5.5vw, 1.95rem);
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: -0.02em;
  color: #ffffff;
  text-wrap: balance;
}

.hero-finder-h1__accent {
  display: inline;
  background: linear-gradient(135deg, #ffd54f 0%, #ffb300 45%, #ff8f00 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.hero-finder-h2 {
  position: relative;
  margin: 0.85rem 0 0;
  padding-top: 0.85rem;
  font-size: clamp(0.82rem, 3.4vw, 0.98rem);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.88);
  text-wrap: balance;
}

.hero-finder-h2::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 3rem;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #ffb300, #ffd54f, #ffb300, transparent);
}

/* Form card */
.page--finder .card--form {
  border-top: none;
  border-image: none;
  border-radius: 18px;
  padding: 1.35rem 1.25rem 1.5rem;
  box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 16px 40px -12px rgba(79, 70, 229, 0.14);
  animation: pf-rise 0.45s ease-out;
}

.page--finder .card--form::before {
  content: '';
  display: block;
  height: 4px;
  margin: -1.35rem -1.25rem 1.15rem;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(90deg, #1a237e, #3949ab, #ffb300);
}

.page--finder .card-head {
  border-bottom-color: #e0e7ff;
}

.page--finder .card-icon {
  background: linear-gradient(135deg, var(--pf-accent-soft), #c7d2fe);
  color: var(--pf-accent);
  border-radius: 14px;
  width: 46px;
  height: 46px;
  font-size: 1.15rem;
}

.page--finder .field label i {
  color: var(--pf-accent);
}

.form-section {
  margin-bottom: 1.35rem;
}

.form-section__label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed #e2e8f0;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--pf-accent);
}

.form-section__label span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--pf-accent);
  color: #fff;
  font-size: 0.68rem;
}

.page--finder .field input:focus,
.page--finder .field select:focus,
.page--finder .input-wrap input:focus {
  border-color: var(--pf-accent);
  box-shadow: 0 0 0 3px var(--pf-accent-glow);
}

.page--finder .input-wrap input.uppercase-input {
  font-weight: 600;
  letter-spacing: 0.04em;
}

.dob-row {
  display: grid;
  grid-template-columns: 1fr 1.25fr 1.1fr;
  gap: 0.55rem;
}

.dob-row select {
  width: 100%;
  padding: 0.75rem 0.65rem;
  font-size: 0.95rem;
  font-weight: 600;
  border: 2px solid var(--border);
  border-radius: 11px;
  font-family: inherit;
  background: #fafbfc;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%233949ab' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  padding-right: 1.8rem;
}

.dob-row select:focus {
  outline: none;
  border-color: var(--pf-accent);
  background-color: #fff;
  box-shadow: 0 0 0 3px var(--pf-accent-glow);
}

/* Captcha */
.page--finder .captcha-box {
  background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);
  border: 1px solid #c7d2fe;
  border-radius: 14px;
  padding: 1rem;
}

.captcha-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.75rem;
}

.captcha-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem;
  background: #fff;
  border: 2px dashed #a5b4fc;
  border-radius: 12px;
  min-width: 170px;
}

.captcha-visual img {
  display: block;
  height: 46px;
  width: auto;
  border-radius: 6px;
  border: none;
  box-shadow: none;
}

.captcha-visual img.is-loading {
  opacity: 0.3;
  min-width: 140px;
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
  background-size: 200% 100%;
  animation: pf-shimmer 1.2s infinite;
  border-radius: 6px;
}

@keyframes pf-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.captcha-input-wrap {
  flex: 1;
  min-width: 140px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.45rem;
}

.captcha-input-wrap label {
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  margin-bottom: 0 !important;
  color: var(--muted) !important;
}

.page--finder .btn-ghost {
  border-color: #c7d2fe;
  color: var(--pf-accent);
  border-radius: 9px;
  padding: 0.45rem 0.85rem;
  font-size: 0.78rem;
}

.page--finder .btn-ghost:hover {
  background: #e0e7ff;
  border-color: var(--pf-accent);
}

.page--finder .btn-submit {
  background: linear-gradient(135deg, #1a237e 0%, #3949ab 50%, #5c6bc0 100%);
  box-shadow: 0 6px 22px rgba(26, 35, 126, 0.4);
  border-radius: 14px;
  padding: 1rem;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-top: 0.5rem;
}

.page--finder .btn-submit:hover:not(:disabled) {
  box-shadow: 0 8px 28px rgba(26, 35, 126, 0.5);
  transform: translateY(-1px);
}

.page--finder .btn-submit:active:not(:disabled) {
  transform: scale(0.98);
}

/* ── Results output ── */
.card--results {
  margin-top: 1.25rem;
  padding: 1.35rem 1.25rem 1.25rem;
  border-radius: 20px;
  border: 1px solid #e8eaf6;
  box-shadow: 0 12px 40px rgba(26, 35, 126, 0.12);
  animation: pf-rise 0.5s ease-out;
  overflow: visible;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}

.card--results::before {
  content: '';
  display: block;
  height: 4px;
  margin: -1.35rem -1.25rem 1.1rem;
  background: linear-gradient(90deg, var(--pf-accent-dark), var(--pf-accent), var(--pf-gold));
}

.results-success-banner {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.55rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #047857;
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  border: 1px solid #6ee7b7;
  border-radius: 999px;
}

.results-success-banner i {
  font-size: 0.85rem;
}

.results-title {
  margin: 0 0 0.65rem;
  font-size: clamp(1.05rem, 3.8vw, 1.22rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--pf-accent-dark);
  line-height: 1.3;
}

.results-lead {
  margin: 0 0 1.1rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: #64748b;
  line-height: 1.5;
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.result-item {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.result-item__policy-box {
  padding: 1.1rem 1.15rem;
  background: linear-gradient(145deg, #0c1445 0%, #1a237e 40%, #3949ab 100%);
  border-radius: 16px;
  box-shadow: 0 8px 28px rgba(26, 35, 126, 0.28);
  position: relative;
  overflow: hidden;
}

.result-item__policy-box::after {
  content: '';
  position: absolute;
  top: -30%;
  right: -15%;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(255, 193, 7, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.result-item__policy-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.55rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  position: relative;
  z-index: 1;
}

.result-item__policy-label i {
  color: var(--pf-gold);
  font-size: 0.8rem;
}

.result-item__policy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: nowrap;
  position: relative;
  z-index: 1;
}

.policy-num {
  color: #ffd54f;
  font-size: clamp(1.35rem, 5.5vw, 1.7rem);
  font-weight: 800;
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.result-item__meta {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: #fafbff;
  border: 1px solid #e8eaf6;
  border-radius: 14px;
  overflow: hidden;
}

.result-item__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  font-size: 0.88rem;
  line-height: 1.4;
  border-bottom: 1px solid #eef2ff;
}

.result-item__row:last-child {
  border-bottom: none;
}

.result-item__key {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  color: #64748b;
  font-weight: 600;
  font-size: 0.82rem;
}

.result-item__key i {
  width: 1rem;
  text-align: center;
  color: var(--pf-accent);
  font-size: 0.78rem;
}

.result-item__val {
  text-align: right;
  color: #0f172a;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  word-break: break-word;
}

.btn-copy {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: inherit;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s, color 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-copy--light {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(4px);
}

.btn-copy--light:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(1.03);
}

.btn-copy.is-copied {
  background: #059669 !important;
  border-color: #34d399 !important;
  color: #fff !important;
}

.btn-search-again {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  margin-top: 1rem;
  padding: 0.8rem 1rem;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: inherit;
  color: var(--pf-accent-dark);
  background: #fff;
  border: 2px solid #c5cae9;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.btn-search-again:hover {
  background: var(--pf-accent-soft);
  border-color: var(--pf-accent);
  transform: translateY(-1px);
}

.card--form[hidden],
.card--results[hidden] {
  display: none !important;
}

.card--results:not([hidden]) {
  display: block;
}

.results-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #eef2ff;
}

.results-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.8rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
  border-radius: 12px;
  transition: transform 0.15s, box-shadow 0.2s;
}

.results-action i {
  font-size: 0.95rem;
}

.results-action:hover {
  transform: translateY(-2px);
  color: #fff;
}

.results-action--bond {
  background: linear-gradient(135deg, #5b21b6, #7c3aed);
  box-shadow: 0 4px 14px rgba(91, 33, 182, 0.28);
}

.results-action--slip {
  background: linear-gradient(135deg, #1a237e, #3949ab);
  box-shadow: 0 4px 14px rgba(26, 35, 126, 0.28);
}

.results-next {
  margin: 0.9rem 0 0;
  text-align: center;
  font-size: 0.76rem;
  color: #94a3b8;
  line-height: 1.5;
}

.results-next a {
  color: var(--pf-accent);
  font-weight: 600;
  text-decoration: none;
}

.results-next a:hover {
  text-decoration: underline;
}

/* AdSense in results card — filled via JS when card is visible */
.card--results .ad-wrap--results-details {
  position: relative;
  z-index: 2;
  max-width: none;
  overflow: visible;
  margin: 1rem 0 0.65rem;
  padding: 0.65rem 0 0.35rem;
  border-top: 1px solid #eef2ff;
  min-height: 28px;
}

.card--results .ad-wrap--results-details .adsbygoogle--link {
  min-height: 28px;
}

/* Above form — inside .main so negative main margin does not cover the ad */
.page--finder .main > .ad-wrap--below-hero {
  position: relative;
  z-index: 3;
  margin: 0 0 0.85rem;
  padding: 0.25rem 0 0.35rem;
  max-width: none;
  overflow: visible;
}

.page--finder .main > .ad-wrap--below-hero .adsbygoogle--link {
  min-height: 28px;
}

/* ── SEO content — modern typography ── */
.seo-block {
  margin-top: 1.5rem;
  padding: 1.4rem 1.25rem 1.35rem;
  background: linear-gradient(180deg, #fafbff 0%, #ffffff 100%);
  border: 1px solid #e8eaf6;
  border-radius: 16px;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  font-feature-settings: 'kern' 1, 'liga' 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.seo-block__title {
  margin: 0 0 0.9rem;
  font-size: clamp(1.1rem, 4vw, 1.28rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--pf-accent-dark);
  line-height: 1.25;
}

.seo-block__subtitle {
  margin: 1.2rem 0 0.7rem;
  padding-left: 0.7rem;
  border-left: 3px solid var(--pf-gold);
  font-size: clamp(0.9rem, 3.2vw, 0.98rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #1e293b;
  line-height: 1.35;
}

.seo-block__text {
  margin: 0;
  font-size: clamp(0.9rem, 2.8vw, 0.96rem);
  font-weight: 400;
  color: #475569;
  line-height: 1.78;
  letter-spacing: 0.01em;
}

.seo-block__text strong {
  color: #0f172a;
  font-weight: 600;
}

.seo-block__text a {
  color: var(--pf-accent);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(57, 73, 171, 0.3);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s, color 0.15s;
}

.seo-block__text a:hover {
  color: var(--pf-accent-dark);
  text-decoration-color: var(--pf-accent);
}

.seo-block__text--last {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #eef2ff;
  font-size: clamp(0.88rem, 2.6vw, 0.94rem);
  color: #64748b;
}

.seo-block__list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: seo-step;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.seo-block__list li {
  counter-increment: seo-step;
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.55rem 0.65rem;
  font-size: clamp(0.88rem, 2.7vw, 0.94rem);
  font-weight: 400;
  color: #475569;
  line-height: 1.65;
  letter-spacing: 0.01em;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 10px;
}

.seo-block__list li::before {
  content: counter(seo-step);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  margin-top: 0.05rem;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--pf-accent-dark), var(--pf-accent));
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(26, 35, 126, 0.2);
}

.seo-block__list strong {
  color: #0f172a;
  font-weight: 600;
}

.seo-note {
  margin: 1rem 0 0;
  padding: 0.85rem 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.55;
  text-align: center;
}

.seo-note a {
  color: var(--pf-accent);
  font-weight: 600;
}

/* Fetch overlay — policy finder */
.page--finder .fetch-panel {
  border-radius: 22px;
  max-width: 380px;
  padding: 2rem 1.5rem 1.5rem;
}

.page--finder .fetch-spinner {
  border-color: #e0e7ff;
  border-top-color: var(--pf-accent);
  border-right-color: #5c6bc0;
  width: 56px;
  height: 56px;
}

.page--finder .fetch-progress {
  display: block;
  height: 5px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin: 0.75rem 0 1rem;
}

.page--finder .fetch-progress-bar {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #1a237e, #5c6bc0);
  border-radius: 999px;
  transition: width 0.5s ease;
}

.fetch-steps {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.fetch-step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e2e8f0;
  transition: background 0.3s, transform 0.3s;
}

.fetch-step-dot.is-active {
  background: var(--pf-accent);
  transform: scale(1.25);
}

.fetch-step-dot.is-done {
  background: #34d399;
}

@keyframes pf-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 520px) {
  .captcha-panel {
    flex-direction: column;
  }

  .captcha-visual {
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
    min-width: unset;
  }

  .result-item__policy-row {
    flex-wrap: wrap;
  }
}

@media (min-width: 600px) {
  .page--finder .main {
    padding: 0 1.5rem 2.5rem;
  }

  .page--finder .card--form {
    padding: 1.5rem 1.5rem 1.65rem;
  }

  .page--finder .card--form::before {
    margin-left: -1.5rem;
    margin-right: -1.5rem;
    margin-top: -1.5rem;
  }
}
