* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #fff;
  color: rgba(0, 0, 0, 0.87);
  font: 400 16px / 24px "Source Sans 3", "Source Sans Pro", Arial, sans-serif;
  letter-spacing: 0.25px;
  -webkit-font-smoothing: antialiased;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

a {
  color: #23085a;
}

.skip-link {
  position: absolute;
  left: 0;
  right: 0;
  top: -3rem;
  z-index: 100;
  background: #333;
  color: #fff;
  padding: 5px 15px;
  text-align: center;
}

.skip-link:focus {
  top: 0;
}

.credential-view {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.credential-view a:hover {
  color: #ff00c8;
}

.cred-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
  min-height: 58px;
  padding: 0 32px;
  background: #23085a;
  color: #fff;
}

.cred-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  text-decoration: none;
}

.cred-brand:hover {
  color: #fff;
}

.cred-mark {
  display: block;
  flex-shrink: 0;
}

.cred-brand span {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.05;
}

.cred-brand strong {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.cred-signin-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 14px;
  line-height: 20px;
  text-decoration: none;
}

.cred-signin-nav:hover {
  color: #fff;
  opacity: 0.88;
}

.cred-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 58px);
  padding: 24px;
  background: #eee;
}

.cred-private-badge {
  position: absolute;
  top: 16px;
  right: 32px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid #e0e0e0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  color: #5f6368;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0.15px;
  pointer-events: none;
  cursor: default;
  user-select: none;
}

.certificate {
  display: block;
  width: fit-content;
  max-width: min(680px, calc(100vw - 48px));
  margin: 0 auto;
  line-height: 0;
  overflow: hidden;
  background: #fff;
  border: 0;
  box-shadow: none;
}

.certificate-scan {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(100vh - 106px);
  border: 0;
  background: #fff;
}

.cred-details {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 56px;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 36px 48px 72px;
  background: #fff;
}

.cred-issuer-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
  color: #23085a;
  font-size: 16px;
  line-height: 24px;
  text-decoration: none;
}

.cred-issuer-logo {
  display: block;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}

.cred-issuer-name {
  color: #23085a;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cred-title {
  margin: 0 0 18px;
  color: rgba(0, 0, 0, 0.87);
  font-size: 28px;
  font-weight: 400;
  line-height: 36px;
}

.cred-title a {
  color: inherit;
  text-decoration: none;
}

.cred-toolbar {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 0 0 10px;
  color: #5f6368;
  font-size: 12px;
  letter-spacing: 0.6px;
}

.cred-tool {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: #5f6368;
  font: inherit;
  letter-spacing: 0.6px;
  text-decoration: none;
  cursor: pointer;
}

.cred-tool:hover {
  color: #ff00c8;
}

.cred-signin {
  display: inline-block;
  margin: 0 0 28px;
  color: #23085a;
  font-size: 14px;
  line-height: 24px;
  text-decoration: none;
}

.cred-show-more {
  display: none;
}

.cred-mobile-actions {
  display: none;
}

.cred-person {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.cred-person-name {
  margin: 0;
  font-size: 16px;
  line-height: 22px;
}

.cred-avatar {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  background: #23085a;
  color: #fff;
  font-size: 14px;
}

.cred-all {
  display: block;
  color: #23085a;
  font-size: 16px;
  line-height: 22px;
  text-decoration: none;
}

.cred-all:hover {
  color: #ff00c8;
  text-decoration: underline;
}

.cred-about {
  margin: 0 0 28px;
}

.cred-about p {
  margin: 0 0 16px;
  font-size: 16px;
  line-height: 24px;
}

.cred-about p:last-child {
  margin-bottom: 0;
}

.cred-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 0;
}

.cred-meta dt {
  color: rgba(0, 0, 0, 0.54);
  font-size: 12px;
  line-height: 20px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.cred-meta dd {
  margin: 2px 0 0;
  font-size: 16px;
  line-height: 24px;
}

.cred-side {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cred-card {
  padding: 20px 20px 24px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  background: #fff;
}

.cred-card h2 {
  margin: 0 0 16px;
  color: rgba(0, 0, 0, 0.87);
  font-size: 20px;
  font-weight: 400;
  line-height: 28px;
}

.cred-verify-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 14px;
  color: rgba(0, 0, 0, 0.87);
  font-size: 14px;
  line-height: 20px;
  text-decoration: none;
}

.cred-check,
.cred-lock {
  display: grid;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  place-items: center;
}

.cred-verify-copy {
  align-items: center;
}

.cred-copy-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  padding: 0;
  border: 0;
  background: none;
  color: #23085a;
  font: 400 14px / 20px "Source Sans 3", sans-serif;
  cursor: pointer;
  white-space: nowrap;
}

.cred-copy-link:hover {
  color: #ff00c8;
}

.cred-outline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  margin: 8px 0 0;
  padding: 8px 16px;
  border: 1px solid rgba(0, 0, 0, 0.22);
  border-radius: 4px;
  background: #fff;
  color: rgba(0, 0, 0, 0.7);
  font-size: 14px;
  text-decoration: none;
}

.cred-outline:hover {
  color: #ff00c8;
  border-color: #ff00c8;
}

.cred-more-label {
  display: block;
  margin: 20px 0 4px;
  color: rgba(0, 0, 0, 0.54);
  font-size: 12px;
  line-height: 20px;
  text-decoration: none;
}

.cred-foot {
  padding: 22px 48px 88px;
  background: #23085a;
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  line-height: 20px;
}

.cred-foot a {
  color: inherit;
  text-decoration: none;
}

.cred-foot p {
  margin: 0 0 4px;
}

.cred-foot p + p {
  color: rgba(255, 255, 255, 0.72);
}

.cred-cookies {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 56px;
  padding: 10px 24px;
  background: #23232fe6;
  color: #fff;
  font-size: 14px;
}

.cred-cookies p {
  margin: 0;
  flex: 1;
}

.cred-cookies a {
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
}

.cred-cookies-ok {
  flex-shrink: 0;
  min-width: 88px;
  height: 36px;
  padding: 0 18px;
  border: 0;
  border-radius: 4px;
  background: #00a6a3;
  color: #fff;
  font: 700 14px / 36px "Source Sans 3", sans-serif;
  cursor: pointer;
}

.cred-cookies.is-hidden {
  display: none;
}

@media print {
  @page {
    size: A4 portrait;
    margin: 0;
  }

  .skip-link,
  .no-print,
  .cred-top,
  .cred-private-badge,
  .cred-details,
  .cred-foot,
  .cred-cookies {
    display: none !important;
  }

  .cred-stage {
    min-height: 0;
    padding: 0;
    background: #fff;
  }

  .certificate-scan {
    max-height: none;
    width: 210mm;
  }
}

@media (max-width: 980px) {
  .cred-top {
    height: 56px;
    min-height: 56px;
    padding: 0 16px;
  }

  .cred-stage {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    min-height: 0;
    padding: 16px 16px 28px;
  }

  .cred-private-badge {
    position: static;
    height: 36px;
    margin: 0 0 16px;
    padding: 0 14px;
    border-radius: 18px;
  }

  .certificate {
    width: 100%;
    max-width: 100%;
  }

  .certificate-scan {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: none;
    aspect-ratio: 210 / 297;
  }

  .cred-details {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 24px 16px 72px;
  }

  .cred-issuer-line {
    gap: 12px;
    margin: 0 0 10px;
    font-size: 20px;
    line-height: 28px;
  }

  .cred-issuer-logo {
    width: 40px;
    height: 40px;
  }

  .cred-issuer-name {
    font-size: 20px;
    line-height: 28px;
    text-underline-offset: 4px;
  }

  .cred-title {
    margin: 0 0 20px;
    font-size: 24px;
    line-height: 32px;
    font-weight: 400;
  }

  .cred-toolbar {
    display: none;
  }

  .cred-mobile-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: 100%;
    margin: 0 0 16px;
  }

  .cred-mobile-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid rgba(0, 0, 0, 0.22);
    border-radius: 4px;
    background: #fff;
    color: rgba(0, 0, 0, 0.87);
    font: 400 16px / 24px "Source Sans 3", "Source Sans Pro", sans-serif;
    cursor: pointer;
  }

  .cred-signin {
    display: inline-block;
    margin: 0 0 24px;
    font-size: 16px;
    line-height: 24px;
    text-decoration: underline;
    text-underline-offset: 3px;
  }

  .cred-person {
    gap: 12px;
    margin-bottom: 8px;
  }

  .cred-extra {
    display: none;
    margin: 12px 0 8px;
  }

  .cred-extra.is-open {
    display: block;
  }

  .cred-show-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin: 8px 0 28px;
    padding: 8px 0;
    border: 0;
    background: none;
    color: #23085a;
    font: 400 16px / 24px "Source Sans 3", "Source Sans Pro", sans-serif;
    cursor: pointer;
  }

  .cred-show-more svg {
    display: block;
    transition: transform 0.15s ease;
  }

  .cred-show-more.is-open svg {
    transform: rotate(180deg);
  }

  .cred-person-name {
    font-size: 16px;
    line-height: 22px;
  }

  .cred-all {
    font-size: 16px;
    line-height: 22px;
    text-decoration: underline;
    text-underline-offset: 3px;
    color: #9aa0a6;
  }

  .cred-avatar {
    width: 40px;
    height: 40px;
    background: #5e35b1;
    font-size: 14px;
  }

  .cred-meta {
    grid-template-columns: 1fr;
  }

  .cred-foot {
    padding: 20px 20px 88px;
  }

  .cred-cookies {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
}
