* { box-sizing: border-box; }
[hidden] { display: none !important; }

:root {
  color: #182330;
  background: #e8f2fb;
  font: 16px/1.45 'Open Sans', system-ui, sans-serif;
  --action: #1890ff;
  --gutter: clamp(12px, 2.35vw, 34px);
}
body { margin: 0; }
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding: 4px var(--gutter);
  background: #fff;
  border-bottom: 1px solid #dfe9f2;
}
.site-header img, .issuer-mark img { display: block; object-fit: contain; }
.site-header span { font-size: .875rem; color: #445a6e; }
main {
  margin: var(--gutter) var(--gutter) clamp(28px, 5vw, 80px);
  padding: var(--gutter);
  background: #fff;
}
.certificate-summary {
  padding: clamp(14px, 2vw, 24px);
  background: #edf5fc;
  border-radius: 8px;
}
.issuer-heading { display: flex; align-items: center; gap: clamp(10px, 1.3vw, 20px); }
.issuer-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: clamp(60px, 6vw, 96px);
  aspect-ratio: 1;
  background: white;
  border: 1px solid #d6e2eb;
  border-radius: 50%;
}
.issuer-mark img { width: 100%; height: auto; }
h1 { margin: 0; font-size: clamp(1.125rem, 2.3vw, 1.5rem); line-height: 1.3; font-weight: 400; overflow-wrap: anywhere; }
h1 strong { font-weight: 600; }
dl { display: flex; flex-wrap: wrap; gap: 12px clamp(22px, 4vw, 68px); margin: 12px 0; }
dl div { min-width: 100px; max-width: 100%; }
dl div:first-child { flex-basis: 100%; }
dt { font-size: .875rem; color: #445a6e; }
dd { margin: 2px 0 0; font-size: clamp(1rem, 1.7vw, 1.375rem); font-weight: 600; overflow-wrap: anywhere; white-space: pre-wrap; }
#status { margin: 8px 0 0; color: #445a6e; font-size: .875rem; }
#status:empty { display: none; }
main[data-state="loading"] dd {
  color: transparent;
  width: 8rem;
  max-width: 100%;
  border-radius: 4px;
  background: #cbdfee;
  animation: pulse .9s ease-in-out infinite alternate;
}
main[data-state="error"] #status { color: #8d362b; }
#retry, #certificate-download {
  display: inline-block;
  padding: 8px 14px;
  color: white;
  background: var(--action);
  border: 0;
  border-radius: 4px;
  font: inherit;
  font-size: .875rem;
  text-decoration: none;
  cursor: pointer;
}
#retry { margin-top: 12px; }
#retry:hover, #certificate-download:hover { background: #096dd9; }
a:focus-visible, button:focus-visible { outline: 3px solid #064788; outline-offset: 3px; }

#certificate-viewer { width: min(100%, 80rem, 80%); margin: clamp(16px, 2vw, 28px) auto 0; text-align: center; }
#certificate-image {
  display: block;
  width: 100%;
  height: auto;
}
#certificate-download { margin-top: clamp(24px, 4vw, 58px); }
@keyframes pulse { to { opacity: .48; } }
@media (max-width: 600px) { #certificate-viewer { width: 100%; } }
@media (prefers-reduced-motion: reduce) { main[data-state="loading"] dd { animation: none; } }

.site-footer {
  padding-inline: calc(2 * var(--gutter));
  background: #fff;
  color: #182330;
  font-size: .875rem;
}
.footer-inner { padding: 24px 16px 28px; background: #f5f7f9; }
.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px 20px;
}
.footer-website, .footer-row nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.footer-website a { color: var(--action); }
.footer-social a { display: inline-flex; border-radius: 3px; text-decoration: none; }
.social-icon { display: block; width: 24px; height: 24px; object-fit: contain; }
.footer-row .footer-social { gap: 8px 20px; }
.footer-policies { margin-top: 8px; border-top: 1px solid #52606c; padding-top: 8px; }
.footer-policies nav { gap: 0; }
.footer-policies a { color: inherit; text-decoration: none; }
.footer-policies a:hover { text-decoration: underline; }
.footer-policies nav a + a { border-left: 1px solid #52606c; margin-left: 9px; padding-left: 9px; }
@media (max-width: 600px) {
  .site-footer { padding-inline: var(--gutter); }
  .footer-inner { padding: 16px; }
}
