/* Certificate verification page */

body.verify-page {
  background: #f4f7fc;
}

.vfy-page {
  --vfy-purple: #7c3aed;
  --vfy-navy: #0f2744;
  --vfy-muted: #64748b;
}

.vfy-hero {
  background: linear-gradient(135deg, #0f2744 0%, #1e3a5f 45%, #312e81 100%);
  color: #fff;
  padding: 2.25rem 0 2.5rem;
  text-align: center;
}

.vfy-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  margin-bottom: 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.vfy-hero-badge::before {
  content: '';
  width: 0.9rem;
  height: 0.9rem;
  background: center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%2322c55e' viewBox='0 0 24 24'%3E%3Cpath d='M12 1 3 5v6c0 5.5 3.8 10.7 9 12 5.2-1.3 9-6.5 9-12V5l-9-4zm-2.2 14.2-3.6-3.6 1.4-1.4 2.2 2.2 5.6-5.6 1.4 1.4-6.4 6.4z'/%3E%3C/svg%3E");
}

.vfy-hero h1 {
  margin: 0 0 0.45rem;
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  font-weight: 800;
}

.vfy-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.95rem;
}

.vfy-main {
  margin-top: -1.25rem;
  padding-bottom: 3rem;
}

.vfy-alert {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
}

.vfy-alert--danger {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.vfy-alert--warn {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

.vfy-panel {
  background: #fff;
  border-radius: 22px;
  border: 1px solid rgba(15, 39, 68, 0.07);
  box-shadow: 0 18px 50px rgba(15, 39, 68, 0.08);
  padding: 1.75rem 1.75rem 1.5rem;
}

.vfy-top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.75rem 2rem;
  align-items: center;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid rgba(15, 39, 68, 0.07);
  margin-bottom: 1.75rem;
}

.vfy-cert-visual {
  text-align: center;
}

.vfy-cert-visual--bronze { --vfy-glow: rgba(180, 83, 9, 0.18); }
.vfy-cert-visual--silver { --vfy-glow: rgba(100, 116, 139, 0.2); }
.vfy-cert-visual--gold { --vfy-glow: rgba(202, 138, 4, 0.22); }
.vfy-cert-visual--platinum { --vfy-glow: rgba(124, 58, 237, 0.22); }

.vfy-cert-img {
  width: 140px;
  height: auto;
  max-height: 155px;
  object-fit: contain;
  display: block;
  margin: 0 auto 0.65rem;
  filter: drop-shadow(0 14px 28px var(--vfy-glow, rgba(15, 39, 68, 0.15)));
}

.vfy-cert-img--muted {
  opacity: 0.72;
  filter: grayscale(0.15) drop-shadow(0 8px 18px rgba(15, 39, 68, 0.1));
}

.vfy-level-pill {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.vfy-level-pill--bronze { background: #ffedd5; color: #9a3412; }
.vfy-level-pill--silver { background: #f1f5f9; color: #475569; }
.vfy-level-pill--gold { background: #dcfce7; color: #15803d; }
.vfy-level-pill--platinum { background: #ede9fe; color: #6d28d9; }

.vfy-kicker {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--vfy-purple);
}

.vfy-site-info h2 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  color: var(--vfy-navy);
  line-height: 1.15;
}

.vfy-site-url {
  display: inline-block;
  margin-bottom: 0.65rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: #2563eb;
  text-decoration: none;
}

.vfy-site-url:hover { text-decoration: underline; }

.vfy-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}

.vfy-status,
.vfy-pill {
  display: inline-flex;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
}

.vfy-status--active { background: #dcfce7; color: #15803d; }
.vfy-status--revoked { background: #fef2f2; color: #dc2626; }
.vfy-status--suspended { background: #fffbeb; color: #d97706; }

.vfy-pill--ssl {
  background: #eff6ff;
  color: #1d4ed8;
}

.vfy-desc {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--vfy-muted);
  max-width: 46ch;
}

.vfy-score-hero {
  text-align: center;
  min-width: 150px;
}

.vfy-score-label {
  display: block;
  margin-bottom: 0.65rem;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--vfy-navy);
}

.vfy-score-ring {
  position: relative;
  width: 132px;
  height: 132px;
  margin-inline: auto;
}

.vfy-score-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.vfy-ring-track {
  fill: none;
  stroke: #e2e8f0;
  stroke-width: 10;
}

.vfy-ring-fill {
  fill: none;
  stroke: url(#vfyRingGrad);
  stroke: #7c3aed;
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 326.7;
  stroke-dashoffset: calc(326.7 - (326.7 * var(--vfy-pct) / 100));
  transition: stroke-dashoffset 0.8s ease;
}

.vfy-score-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.vfy-score-center strong {
  font-size: 2rem;
  font-weight: 800;
  color: var(--vfy-navy);
  line-height: 1;
}

.vfy-score-center span {
  font-size: 0.72rem;
  color: var(--vfy-muted);
  margin-top: 0.15rem;
}

.vfy-breakdown {
  margin-bottom: 1.5rem;
}

.vfy-breakdown h3,
.vfy-meta-card h3 {
  margin: 0 0 0.85rem;
  font-size: 1rem;
  color: var(--vfy-navy);
}

.vfy-comp-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.vfy-comp {
  padding: 0.85rem 0.9rem;
  border-radius: 14px;
  border: 1px solid rgba(15, 39, 68, 0.07);
  background: #f8fafc;
}

.vfy-comp header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.vfy-comp-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: #475569;
}

.vfy-comp header strong {
  font-size: 0.88rem;
  color: var(--vfy-navy);
}

.vfy-comp-bar {
  height: 7px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.vfy-comp-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.vfy-comp--ai .vfy-comp-bar span { background: linear-gradient(90deg, #2563eb, #60a5fa); }
.vfy-comp--edu .vfy-comp-bar span { background: linear-gradient(90deg, #16a34a, #4ade80); }
.vfy-comp--parent .vfy-comp-bar span { background: linear-gradient(90deg, #7c3aed, #a78bfa); }
.vfy-comp--quality .vfy-comp-bar span { background: linear-gradient(90deg, #ea580c, #fb923c); }

.vfy-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.vfy-meta-card {
  padding: 1rem 1.1rem;
  border-radius: 14px;
  border: 1px solid rgba(15, 39, 68, 0.07);
  background: #f8fafc;
}

.vfy-meta-card dl {
  margin: 0;
}

.vfy-meta-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(15, 39, 68, 0.05);
  font-size: 0.82rem;
}

.vfy-meta-card dl div:last-child { border-bottom: none; }

.vfy-meta-card dt {
  color: var(--vfy-muted);
  font-weight: 600;
}

.vfy-meta-card dd {
  margin: 0;
  font-weight: 800;
  color: var(--vfy-navy);
  text-align: end;
}

.vfy-meta-card code {
  font-size: 0.75rem;
  font-weight: 700;
}

.vfy-votes-num {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--vfy-navy);
}

.vfy-votes-sub {
  margin: 0.15rem 0 0.85rem;
  font-size: 0.82rem;
  color: var(--vfy-muted);
}

.vfy-embed h4 {
  margin: 0 0 0.25rem;
  font-size: 0.82rem;
  color: var(--vfy-navy);
}

.vfy-embed p {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  color: var(--vfy-muted);
  line-height: 1.45;
}

.vfy-embed-note {
  margin: 0 0 0.65rem;
  font-size: 0.68rem;
  color: #64748b;
  line-height: 1.45;
}

.vfy-embed-preview-label {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--vfy-navy);
}

.vfy-embed-preview {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
  border: 1px solid #e2e8f0;
}

.vfy-embed-preview a {
  display: inline-block;
  line-height: 0;
}

.vfy-embed-preview img {
  display: block;
  max-width: 160px;
  width: 100%;
  height: auto;
  border: 0;
}

.vfy-embed-code {
  display: block;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e2e8f0;
  font-size: 0.68rem;
  word-break: break-all;
  color: #334155;
}

.vfy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.vfy-btn-primary {
  background: linear-gradient(135deg, #7c3aed, #6d28d9) !important;
  color: #fff !important;
  border-radius: 999px;
  font-weight: 800;
  padding: 0.72rem 1.35rem;
  box-shadow: 0 8px 22px rgba(124, 58, 237, 0.25);
}

.vfy-btn-outline {
  background: #fff !important;
  color: var(--vfy-purple) !important;
  border: 2px solid var(--vfy-purple) !important;
  border-radius: 999px;
  font-weight: 800;
  padding: 0.68rem 1.25rem;
}

@media (max-width: 960px) {
  .vfy-top {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .vfy-site-info .vfy-desc {
    max-width: none;
    margin-inline: auto;
  }

  .vfy-pills {
    justify-content: center;
  }

  .vfy-comp-grid,
  .vfy-meta-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .vfy-panel {
    padding: 1.25rem 1rem;
  }

  .vfy-comp-grid,
  .vfy-meta-grid {
    grid-template-columns: 1fr;
  }

  .vfy-actions {
    flex-direction: column;
  }

  .vfy-actions .btn {
    width: 100%;
    justify-content: center;
  }
}
