.cert-wrapper,
.cert-wrapper .box-container {
  font-family: "Source Han Sans SC", "Source Han Sans CN", "思源黑体 CN", "Noto Sans CJK SC", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", Arial, sans-serif;
}

.cert-wrapper .main {
  padding: 0;
  background: transparent;
}

.cert-query {
  max-width: 960px;
  margin: 0 auto;
}

.cert-noscript {
  margin: 0 0 20px;
  padding: 12px 18px;
  font-size: 14px;
  color: #af1319;
  background: #fdf0f0;
  border: 1px solid #f0c9c9;
  text-align: center;
}

.cert-wrapper .intro {
  max-width: 960px;
  margin: 0 auto 30px;
  padding: 0 50px;
  font-size: 16px;
  line-height: 30px;
  color: #666;
  text-align: left;
}

.cert-wrapper .intro p {
  margin: 0;
  text-align: left;
}

.cert-form {
  background: #f6f6f6;
  border: 1px solid #f0f0f0;
  padding: 42px 50px 36px;
}

.cert-form__grid {
  display: flex;
  gap: 40px;
}

.cert-field {
  flex: 1;
  min-width: 0;
}

.cert-field label {
  display: block;
  font-size: 14px;
  color: #666;
  line-height: 30px;
  margin-bottom: 10px;
}

.cert-field input {
  width: 100%;
  height: 50px;
  padding: 0 20px;
  font-size: 14px;
  color: #333;
  background: #fff;
  border: 1px solid #e2e2e2;
  border-radius: 5px;
  outline: none;
  transition: border-color 0.2s ease;
}

.cert-field input::placeholder {
  color: #aaa;
}

.cert-field input:focus {
  border-color: #0064b4;
}

.cert-form__actions {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

.cert-submit,
.cert-reset {
  height: 44px;
  font-size: 15px;
  font-family: inherit;
  border-radius: 30px;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.cert-submit {
  width: 160px;
  border: 2px solid #0064b4;
  background: #0064b4;
  color: #fff;
  letter-spacing: 4px;
}

.cert-submit:hover {
  background: #f79c0e;
  border-color: #f79c0e;
}

.cert-submit:disabled {
  opacity: 0.7;
  cursor: progress;
}

.cert-reset {
  width: 120px;
  border: 2px solid #0064b4;
  background: #fff;
  color: #0064b4;
  letter-spacing: 2px;
}

.cert-reset:hover {
  background: #0064b4;
  color: #fff;
}

.cert-tip {
  margin: 16px 0 0;
  text-align: center;
  font-size: 13px;
  color: #999;
}

.cert-tip.is-error {
  color: #af1319;
}

.cert-result {
  margin-top: 40px;
}

.cert-result[hidden] {
  display: none;
}

.cert-result__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 24px;
  border-bottom: 1px solid #e2e2e2;
  font-size: 13px;
  color: #999;
}

.cert-result__bar strong {
  color: #0064b4;
  font-size: 16px;
}

.cert-card {
  position: relative;
  padding: 30px 34px 26px;
  margin-bottom: 24px;
  background: #fff;
  border: 1px solid #e2e2e2;
}

.cert-card::before {
  content: "";
  position: absolute;
  left: -1px;
  top: -1px;
  bottom: -1px;
  width: 4px;
  background: #0064b4;
}

.cert-card--expired::before {
  background: #c9a227;
}

.cert-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid #f0f0f0;
}

.cert-card__label {
  font-size: 12px;
  letter-spacing: 6px;
  color: #0064b4;
}

.cert-card__head h3 {
  margin: 6px 0 0;
  font-size: 24px;
  font-weight: 700;
  color: #333;
}

.cert-badge {
  flex: none;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 700;
  color: #1f9d55;
  background: #eef9f2;
  border: 1px solid #bfe6cf;
}

.cert-badge--expired {
  color: #af1319;
  background: #fdf0f0;
  border-color: #f0c9c9;
}

.cert-card__meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 30px;
  margin: 22px 0 0;
}

.cert-card__meta div {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.cert-card__meta dt {
  flex: none;
  width: 76px;
  font-size: 14px;
  color: #999;
}

.cert-card__meta dd {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #333;
  letter-spacing: 0.5px;
  word-break: break-all;
}

.cert-card__statement {
  margin: 18px 0 0;
  padding: 12px 18px;
  font-size: 14px;
  color: #666;
  background: #f6f6f6;
  border-left: 3px solid #b7d3ea;
}

.cert-card__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #f0f0f0;
}

.cert-card__foot strong {
  display: block;
  font-size: 15px;
  color: #333;
}

.cert-card__foot span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: #aaa;
}


.cert-preview {
  margin: 24px 0 0;
  text-align: center;
}

.cert-preview[hidden] {
  display: none;
}

.cert-preview__link {
  display: block;
  background: #fff;
  border: 1px solid #e2e2e2;
  cursor: zoom-in;
}

.cert-preview img {
  display: block;
  width: 100%;
  height: auto;
}


.cert-empty,
.cert-loading {
  padding: 50px 20px;
  text-align: center;
  color: #999;
  background: #fafafa;
  border: 1px dashed #dcdcdc;
}

.cert-empty__icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #0064b4;
  background: #eaf3fb;
  border-radius: 50%;
}

.cert-empty h3 {
  margin: 0 0 8px;
  font-size: 18px;
  color: #333;
}

.cert-empty p {
  margin: 4px 0;
  font-size: 14px;
  color: #666;
}

.cert-empty__tip {
  margin-top: 14px !important;
  font-size: 13px !important;
  color: #999 !important;
}

.cert-loading span {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  vertical-align: -3px;
  border: 2px solid #c9dced;
  border-top-color: #0064b4;
  border-radius: 50%;
  animation: cert-spin 0.8s linear infinite;
}

@keyframes cert-spin {
  to {
    transform: rotate(360deg);
  }
}

.cert-notes {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid #e2e2e2;
}

.cert-notes h3 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 700;
  color: #333;
}

.cert-notes ol {
  margin: 0;
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.9;
  color: #666;
}

.cert-notes li {
  margin-bottom: 6px;
}

.cert-notes strong {
  color: #333;
}

.cert-lightbox {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: rgba(8, 18, 30, 0.88);
}

.cert-lightbox[hidden] {
  display: none;
}

.cert-lightbox img {
  max-width: 94vw;
  max-height: 88vh;
  width: auto;
  height: auto;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

.cert-lightbox__close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.cert-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.24);
}

body.is-locked {
  overflow: hidden;
}

@media (max-width: 900px) {
  .cert-form {
    padding: 28px 24px 26px;
  }

  .cert-form__grid {
    flex-direction: column;
    gap: 0;
  }

  .cert-field {
    margin-bottom: 20px;
  }

  .cert-form__actions {
    margin-top: 10px;
  }

  .cert-card {
    padding: 24px 20px 22px;
  }

  .cert-card__meta {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .cert-card__head h3 {
    font-size: 20px;
  }
}

@media (max-width: 640px) {
  .cert-form__actions {
    gap: 12px;
  }

  .cert-submit {
    width: auto;
    flex: 1;
  }

  .cert-reset {
    width: auto;
    flex: none;
    padding: 0 22px;
  }

  .cert-card__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .cert-card__foot {
    flex-direction: column;
    align-items: flex-start;
  }


  .cert-result__bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .cert-lightbox {
    padding: 12px;
  }

  .cert-lightbox img {
    max-height: 82vh;
  }
}

@media print {
  .header-wrapper,
  .page-nav-box,
  .page-cat-box,
  .site-footer,
  .cert-form,
  .cert-notes,
  .cert-result__bar,
  .page-banner-wrapper,
  .cert-lightbox {
    display: none !important;
  }

  .cert-wrapper .page-title,
  .cert-wrapper .intro {
    display: none !important;
  }

  .cert-query {
    max-width: none;
  }

  .cert-card {
    break-inside: avoid;
    border-color: #999;
  }
}