/*
 * CPM credential system v2
 *
 * One geometry for the four credential surfaces: public single, authenticated
 * page, account-menu preview and modal.  The reference PSICOLE card uses the
 * same 1.55:1 landscape proportion as the official PSICOLE card. Container
 * units keep that proportion
 * stable when a card moves from a desktop column to a phone sheet without
 * stretching the identity or the QR.
 */

:root {
  --cpm-credential-golden-ratio: 1.55;
  --cpm-credential-purple-900: #170b3d;
  --cpm-credential-purple-700: #2a1468;
  --cpm-credential-purple-500: #5b2bb6;
  --cpm-credential-ink: #0b1120;
  --cpm-credential-muted: #64748b;
}

body .cpm-credential-card {
  container-type: inline-size;
  display: flex;
  box-sizing: border-box;
  min-height: 0;
  flex-direction: column;
  aspect-ratio: var(--cpm-credential-golden-ratio) / 1;
  border-radius: clamp(16px, 2.25cqw, 24px);
}

body .cpm-credential-card__header {
  flex: 0 0 auto;
  min-height: clamp(54px, 15.7cqw, 136px);
  box-sizing: border-box;
  padding: clamp(16px, 3.1cqw, 30px) clamp(18px, 3.8cqw, 34px);
}

body .cpm-credential-card__logo {
  width: min(58%, 360px);
  max-height: clamp(32px, 6.2cqw, 58px);
}

body .cpm-credential-card__header > span {
  font-size: clamp(8px, 1.15cqw, 12px);
  letter-spacing: clamp(.12em, .22cqw, .28em);
}

body .cpm-credential-card__body {
  display: flex;
  box-sizing: border-box;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(12px, 3.6cqw, 36px);
}

body .cpm-credential-card__identity {
  min-width: 0;
  align-items: center;
  gap: clamp(12px, 1.9cqw, 20px);
}

body .cpm-credential-card__avatar {
  width: clamp(48px, 13cqw, 124px);
  height: clamp(48px, 13cqw, 124px);
  flex-basis: clamp(48px, 13cqw, 124px);
  border-radius: clamp(12px, 1.75cqw, 18px);
  font-size: clamp(19px, 3cqw, 34px);
}

body .cpm-credential-card__person {
  min-width: 0;
}

body .cpm-credential-card__identity h2 {
  max-width: 100%;
  margin: 0 0 6px;
  overflow: visible;
  color: var(--cpm-credential-ink);
  font-size: clamp(20px, 3.75cqw, 36px);
  line-height: 1.04;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

body .cpm-credential-card__identity p {
  font-size: clamp(12px, 1.75cqw, 20px);
  line-height: 1.25;
}

body .cpm-credential-card__footer {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: clamp(10px, 2cqw, 22px);
  margin-top: clamp(10px, 3cqw, 30px);
  padding-top: clamp(10px, 2.1cqw, 22px);
}

body .cpm-credential-card__expiry {
  min-width: 0;
  gap: clamp(4px, .65cqw, 7px);
  padding-bottom: clamp(4px, .9cqw, 10px);
}

body .cpm-credential-card__expiry span {
  font-size: clamp(9px, 1.25cqw, 13px);
  line-height: 1.2;
}

body .cpm-credential-card__expiry strong {
  font-size: clamp(16px, 2.1cqw, 22px);
  line-height: 1.1;
}

body .cpm-credential-card__expiry strong[data-cpm-credential-validity-state],
body .cpm-credential-card__expiry strong[data-cpm-modal-validity-state] {
  font-size: clamp(16px, 2.05cqw, 22px);
}

body .cpm-credential-card__expiry small {
  font-size: clamp(10px, 1.35cqw, 14px);
  line-height: 1.3;
}

body .cpm-credential-card__expiry small b {
  font-size: inherit;
}

body .cpm-credential-card__qr-wrap {
  display: grid;
  width: clamp(52px, 18.8cqw, 166px);
  aspect-ratio: 1;
  box-sizing: border-box;
  place-items: center;
  padding: clamp(4px, .85cqw, 8px);
  border-radius: clamp(8px, 1.1cqw, 12px);
}

body .cpm-credential-card__qr {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  image-rendering: pixelated;
}

/* The public single is narrower than the authenticated card, but it must not
 * become a second design.  These selectors intentionally outrank the old
 * sidebar adaptations in stabilization-v10300.css. */
body .cpm-prof-single .cpm-credential-card--public {
  width: 100%;
  min-height: 0;
  align-self: start;
}

body .cpm-prof-single .cpm-credential-card--public .cpm-credential-card__logo {
  width: min(58%, 360px);
}

body .cpm-prof-single .cpm-credential-card--public .cpm-credential-card__header > span {
  font-size: clamp(8px, 1.15cqw, 12px);
  letter-spacing: clamp(.12em, .22cqw, .28em);
}

body .cpm-prof-single .cpm-credential-card--public .cpm-credential-card__identity h2 {
  max-width: 100%;
  font-size: clamp(20px, 3.75cqw, 36px);
  line-height: 1.04;
  overflow-wrap: anywhere;
  white-space: normal;
}

/* The compact account preview is the same card at a smaller optical scale,
 * never a stretched row with a separately styled QR. */
body .cpm-account-mini-card {
  container-type: inline-size;
  display: flex;
  box-sizing: border-box;
  /* The account sheet is a flex column with a bounded scroll area. Without
   * an explicit non-shrinking basis, the long access list compresses this
   * credential preview to a 2px sliver on phones. The sheet may scroll; the
   * credential card must keep its golden-ratio geometry. */
  flex: 0 0 auto;
  align-self: center;
  width: calc(100% - 4px);
  min-height: max-content;
  flex-direction: column;
  aspect-ratio: var(--cpm-credential-golden-ratio) / 1;
}

body .cpm-account-mini-card__header {
  flex: 0 0 auto;
  min-height: clamp(34px, 15.7cqw, 64px);
  box-sizing: border-box;
  padding: clamp(8px, 2.3cqw, 14px) clamp(10px, 3cqw, 18px);
}

body .cpm-account-mini-card__header img {
  width: min(42%, 180px);
  max-height: clamp(20px, 5.2cqw, 32px);
}

body .cpm-account-mini-card__header span {
  font-size: clamp(7px, 1.15cqw, 10px);
  letter-spacing: clamp(.09em, .18cqw, .2em);
}

body .cpm-account-mini-card__body {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(11px, 3cqw, 20px);
}

body .cpm-account-mini-card__identity {
  gap: clamp(8px, 1.8cqw, 14px);
}

body .cpm-account-mini-card__avatar {
  width: clamp(38px, 12cqw, 72px);
  height: clamp(38px, 12cqw, 72px);
  flex-basis: clamp(38px, 12cqw, 72px);
  border-radius: clamp(9px, 1.5cqw, 14px);
  font-size: clamp(13px, 2.4cqw, 22px);
}

body .cpm-account-mini-card__person strong {
  font-size: clamp(12px, 2.6cqw, 18px);
  line-height: 1.1;
}

body .cpm-account-mini-card__person > span:last-child {
  font-size: clamp(9px, 1.75cqw, 13px);
}

body .cpm-account-mini-card__footer {
  gap: clamp(8px, 2cqw, 14px);
  margin-top: clamp(10px, 2.8cqw, 18px);
  padding-top: clamp(8px, 2.1cqw, 14px);
}

body .cpm-account-mini-card__footer > div:first-child span {
  font-size: clamp(7px, 1.2cqw, 10px);
}

body .cpm-account-mini-card__footer > div:first-child strong {
  font-size: clamp(10px, 1.7cqw, 14px);
}

body .cpm-account-mini-card__qr-wrap {
  width: clamp(44px, 18.8cqw, 84px);
  aspect-ratio: 1;
  box-sizing: border-box;
  padding: clamp(3px, .8cqw, 6px);
  border-radius: clamp(6px, 1cqw, 9px);
}

body .cpm-account-mini-card__qr-wrap img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
}

@media (max-width: 520px) {
  body .cpm-credential-card {
    min-height: 0;
    border-radius: 18px;
  }

  body .cpm-credential-card__header {
    min-height: 54px;
    padding: 12px 14px;
  }

  body .cpm-credential-card__header > span {
    font-size: 8px;
    letter-spacing: .13em;
  }

  body .cpm-credential-card__body {
    padding: 14px;
  }

  body .cpm-credential-card__identity h2 {
    font-size: clamp(20px, 5.8cqw, 25px);
  }

  body .cpm-credential-card__qr-wrap {
    width: clamp(52px, 18.8cqw, 88px);
  }
}

@media (max-width: 350px) {
  body .cpm-credential-card__header > span {
    display: none;
  }

  body .cpm-credential-card__qr-wrap {
    width: 82px;
  }
}

/* Account/dropdown layering: the menu belongs to the sticky site header, so
 * its parent stacking context must sit above the directory's sticky filters.
 * A high z-index on the panel alone cannot escape a lower header context. */
body .cpm-header {
  position: sticky;
  z-index: 3200 !important;
  isolation: isolate;
}

body .cpm-account-menu {
  position: relative;
  z-index: 2;
}

body .cpm-account-panel {
  z-index: 20 !important;
}

body .psicole-directory--ui26 .psicole-directory__filters {
  z-index: var(--cpm-layer-content-sticky, 260);
}

/* Desktop account popovers must own the foreground. A quiet scrim keeps the
 * sticky directory controls from appearing chopped underneath the panel and
 * makes the open state feel intentional without changing page geometry. */
@media (min-width: 701px) {
  body.cpm-account-sheet-open::before {
    position: fixed;
    z-index: 3190;
    inset: 0;
    background: rgba(20, 12, 33, .14);
    content: "";
    pointer-events: auto;
  }
}

@media (max-width: 700px) {
  body .cpm-header {
    z-index: 3240 !important;
  }

  body .cpm-account-panel {
    z-index: 3250 !important;
  }
}

/* V10700 — PSICOLE credential parity.
 * Keep one canonical card geometry and field order everywhere the credential
 * appears (public single, authenticated page, modal and account preview).
 * The source component in PSICOLE is a 1.55:1 card with subtitle, MAT. N° and
 * status in the identity row, then only VIGENTE HASTA + QR in the footer. */
:root {
  --cpm-credential-golden-ratio: 1.55;
}

body .cpm-credential-intro[hidden] {
  display: none !important;
}

body .cpm-credential-page:has(.cpm-credential-view:not([hidden])) {
  padding-top: clamp(28px, 4vw, 56px);
}

body .cpm-credential-page:has(.cpm-credential-view:not([hidden])) .cpm-credential-intro {
  display: none !important;
}

body .cpm-credential-card {
  aspect-ratio: 1.55 / 1;
  border-radius: clamp(16px, 2.2cqw, 24px);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body .cpm-credential-card__header {
  min-height: clamp(54px, 15.7cqw, 136px);
  padding: clamp(16px, 3.1cqw, 30px) clamp(18px, 3.8cqw, 34px);
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, .7) .5px, transparent .5px),
    radial-gradient(ellipse at 85% 40%, rgba(139, 92, 246, .55) 0%, transparent 60%),
    linear-gradient(110deg, transparent 30%, rgba(167, 139, 250, .08) 50%, transparent 70%),
    linear-gradient(135deg, #0e0620 0%, #180d42 30%, #1c1158 60%, #1a0e52 100%);
  background-size: .9em .9em, auto, auto, auto;
}

body .cpm-credential-card__header::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(167, 139, 250, .08) 50%, transparent 70%);
  content: "";
  pointer-events: none;
}

body .cpm-credential-card__header::after {
  background: radial-gradient(ellipse at 85% 40%, rgba(139, 92, 246, .55) 0%, transparent 60%);
}

body .cpm-credential-card__logo {
  width: min(58%, 360px);
  max-height: clamp(32px, 6.2cqw, 58px);
}

body .cpm-credential-card__header > span {
  font-size: clamp(8px, 1.15cqw, 12px);
  letter-spacing: clamp(.12em, .22cqw, .28em);
}

body .cpm-credential-card__body {
  min-height: 0;
  padding: clamp(12px, 3.6cqw, 36px);
}

body .cpm-credential-card__identity {
  min-width: 0;
  align-items: center;
  gap: clamp(12px, 1.9cqw, 20px);
}

body .cpm-credential-card__avatar {
  width: clamp(48px, 13.7cqw, 124px);
  height: clamp(48px, 13.7cqw, 124px);
  flex-basis: clamp(48px, 13.7cqw, 124px);
  border-radius: clamp(12px, 1.75cqw, 18px);
  font-size: clamp(19px, 3cqw, 34px);
}

body .cpm-credential-card__identity h2 {
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  font-size: clamp(20px, 3.75cqw, 36px);
  line-height: 1.04;
  letter-spacing: -.035em;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
  overflow-wrap: anywhere;
}

body .cpm-credential-card__profession {
  margin: .25em 0 0 !important;
  color: #64748b !important;
  font-family: inherit !important;
  font-size: clamp(11px, 1.65cqw, 18px) !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  line-height: 1.2 !important;
}

body .cpm-credential-card__number-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: .6em;
  margin-top: .5em;
  flex-wrap: wrap;
}

body .cpm-credential-card__number-row > p {
  min-width: 0;
  margin: 0 !important;
  color: #4338ca !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
  font-size: clamp(12px, 1.75cqw, 20px) !important;
  font-weight: 800 !important;
  letter-spacing: .06em !important;
  line-height: 1.15 !important;
  overflow-wrap: anywhere;
}

body .cpm-credential-card__status {
  display: inline-flex;
  min-height: 1.7em;
  align-items: center;
  gap: .35em;
  padding: .2em .7em;
  border: 1px solid #6ee7b7;
  border-radius: 999px;
  background: #d1fae5;
  color: #047857;
  font-size: clamp(8px, 1.15cqw, 12px);
  font-weight: 700;
  letter-spacing: .1em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

body .cpm-credential-card__status i {
  width: .45em;
  height: .45em;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
}

body .cpm-credential-card__status.is-inactive {
  border-color: #cbd5e1;
  background: #f1f5f9;
  color: #64748b;
}

body .cpm-credential-card__status[hidden] {
  display: none !important;
}

body .cpm-credential-card__footer {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: clamp(10px, 2cqw, 22px);
  margin-top: clamp(10px, 3cqw, 30px);
  padding-top: 0;
  border-top: 0;
}

body .cpm-credential-card__expiry {
  min-width: 0;
  gap: clamp(4px, .65cqw, 7px);
  padding-bottom: clamp(4px, .9cqw, 10px);
}

body .cpm-credential-card__expiry span {
  font-size: clamp(9px, 1.25cqw, 13px);
  line-height: 1.2;
}

body .cpm-credential-card__expiry strong[data-cpm-credential-validity],
body .cpm-credential-card__expiry strong[data-cpm-modal-validity] {
  color: #0f172a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: clamp(16px, 2.1cqw, 22px);
  font-weight: 800;
  letter-spacing: .02em;
  line-height: 1.1;
}

body .cpm-credential-card__expiry strong[data-cpm-credential-validity].is-inactive,
body .cpm-credential-card__expiry strong[data-cpm-modal-validity].is-inactive {
  color: #64748b;
}

body .cpm-credential-card__expiry small {
  display: none !important;
}

/* The mobile rule in the legacy stylesheet hid the identity to save space;
 * the official PSICOLE card keeps the complete identity and QR at every size. */
body .cpm-credential-card__identity {
  display: flex !important;
}

/* Account preview: same field order and status treatment at a smaller scale. */
body .cpm-account-mini-card {
  aspect-ratio: 1.55 / 1;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body .cpm-account-mini-card__person {
  min-width: 0;
}

body .cpm-account-mini-card__person > strong {
  display: -webkit-box;
  overflow: hidden;
  color: #0b1120;
  font-size: clamp(12px, 2.6cqw, 18px);
  font-weight: 800;
  line-height: 1.1;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

body .cpm-account-mini-card__profession {
  display: block;
  margin-top: .28em;
  color: #64748b;
  font-size: clamp(9px, 1.75cqw, 13px);
  font-weight: 500;
  line-height: 1.2;
}

body .cpm-account-mini-card__number-row {
  display: flex;
  align-items: center;
  gap: .45em;
  margin-top: .45em;
  flex-wrap: wrap;
}

body .cpm-account-mini-card__number-row > span:first-child {
  color: #4338ca;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: clamp(9px, 1.75cqw, 13px);
  font-weight: 800;
  letter-spacing: .04em;
  line-height: 1.15;
}

body .cpm-account-mini-card__status {
  display: inline-flex;
  min-height: 1.7em;
  align-items: center;
  gap: .3em;
  padding: .2em .55em;
  border: 1px solid #6ee7b7;
  border-radius: 999px;
  background: #d1fae5;
  color: #047857;
  font-size: clamp(7px, 1.1cqw, 10px);
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

body .cpm-account-mini-card__status i {
  width: .45em;
  height: .45em;
  border-radius: 50%;
  background: currentColor;
}

body .cpm-account-mini-card__status.is-inactive {
  border-color: #cbd5e1;
  background: #f1f5f9;
  color: #64748b;
}

body .cpm-account-mini-card__status[hidden] {
  display: none !important;
}

body .cpm-account-mini-card__footer {
  margin-top: clamp(10px, 2.8cqw, 18px);
  padding-top: 0;
  border-top: 0;
}

body .cpm-account-mini-card__footer > div:first-child span {
  font-size: clamp(7px, 1.2cqw, 10px);
  line-height: 1.2;
}

body .cpm-account-mini-card__footer > div:first-child strong {
  color: #0f172a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: clamp(10px, 1.7cqw, 14px);
  font-weight: 800;
}

@media (max-width: 520px) {
  body .cpm-credential-card__identity h2 {
    font-size: clamp(20px, 5.8cqw, 25px);
  }

  body .cpm-credential-card__profession {
    font-size: clamp(11px, 2.2cqw, 14px) !important;
  }

  body .cpm-credential-card__number-row > p {
    font-size: clamp(11px, 2.45cqw, 15px) !important;
  }

  body .cpm-credential-card__status {
    font-size: clamp(8px, 1.9cqw, 10px);
  }
}

/* V999: exact parity with the PSICOLE credential SPA. */
body .cpm-credential-layout:has(.cpm-credential-login[hidden]) {
  max-width: 620px;
  grid-template-columns: minmax(0, 620px);
}

body .cpm-credential-card {
  container-type: inline-size;
  width: 100%;
  max-width: 620px;
  aspect-ratio: 1.55;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  overflow: hidden;
  border: 0;
  border-radius: 1.1em;
  background: #fff;
  box-shadow: 0 28px 70px -12px rgba(12, 7, 40, 0.55), 0 6px 20px -4px rgba(76, 29, 149, 0.25), 0 0 0 0.5px rgba(15, 23, 42, 0.06);
  font-family: Inter, system-ui, -apple-system, sans-serif;
  font-size: 3.2cqi;
}

body .cpm-credential-card__header {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 0.8em;
  min-height: 0;
  padding: 1.1em 1.2em;
  overflow: hidden;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.7) 0.5px, transparent 0.5px),
    linear-gradient(110deg, transparent 30%, rgba(167, 139, 250, 0.08) 50%, transparent 70%),
    linear-gradient(135deg, #0e0620 0%, #180d42 30%, #1c1158 60%, #1a0e52 100%);
  background-size: 0.9em 0.9em, auto, auto;
}

body .cpm-credential-card__header::after {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 85% 40%, rgba(139, 92, 246, 0.55) 0%, transparent 60%);
  content: "";
  pointer-events: none;
}

body .cpm-credential-card__logo {
  position: relative;
  z-index: 1;
  display: block;
  width: auto;
  height: 2.7em;
  max-height: none;
  margin-left: -0.45em;
  object-fit: contain;
  object-position: left center;
  filter: brightness(0) invert(1);
  opacity: 0.96;
}

body .cpm-credential-card__header > span {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  color: rgba(192, 167, 255, 0.85);
  font-size: 0.64em;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  white-space: nowrap;
}

body .cpm-credential-card__body {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  justify-content: space-between;
  padding: 1em 1.2em;
  background: #fff;
}

body .cpm-credential-card__identity {
  display: flex;
  align-items: center;
  gap: 0.95em;
}

body .cpm-credential-card__avatar {
  display: grid;
  width: 4.4em;
  height: 4.4em;
  flex: 0 0 4.4em;
  place-items: center;
  overflow: hidden;
  border-radius: 0.7em;
  background: linear-gradient(135deg, #4338ca 0%, #7c3aed 70%, #c026d3 100%);
  color: #fff;
  font-size: inherit;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(99, 102, 241, 0.22), 0 8px 18px rgba(12, 7, 40, 0.18);
}

body .cpm-credential-card__avatar > span {
  font-size: 1.5em;
  line-height: 1;
}

body .cpm-credential-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body .cpm-credential-card__person {
  min-width: 0;
  flex: 1;
}

body .cpm-credential-card__identity h2 {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #0b1120;
  font-size: 1.85em;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.015em;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  word-break: break-word;
  white-space: normal;
}

body .cpm-credential-card__identity p {
  margin: 0.25em 0 0;
  color: #64748b;
  font-size: 0.82em;
  font-weight: 500;
  line-height: 1.2;
}

body .cpm-credential-card__number-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6em;
  margin-top: 0.5em;
}

body .cpm-credential-card__number-row p {
  margin: 0;
  color: #4338ca;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1em;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.06em;
}

body .cpm-credential-card__status {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  min-height: 0;
  padding: 0.2em 0.7em;
  border: 1px solid #6ee7b7;
  border-radius: 999px;
  background: #d1fae5;
  color: #047857;
  font-size: 0.7em;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

body .cpm-credential-card__status i {
  width: 0.45em;
  height: 0.45em;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #10b981;
}

body .cpm-credential-card__status.is-provisional {
  border-color: #fcd34d;
  background: #fef3c7;
  color: #b45309;
}

body .cpm-credential-card__status.is-provisional i {
  background: #f59e0b;
}

body .cpm-credential-card__status.is-other,
body .cpm-credential-card__status.is-inactive {
  border-color: #fca5a5;
  background: #fee2e2;
  color: #b91c1c;
}

body .cpm-credential-card__status.is-other i,
body .cpm-credential-card__status.is-inactive i {
  background: #ef4444;
}

body .cpm-credential-card__footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1em;
  margin-top: 0.8em;
  padding-top: 0;
  border-top: 0;
}

body .cpm-credential-card__expiry {
  min-width: 0;
  padding-bottom: 0.4em;
}

body .cpm-credential-card__expiry span {
  display: block;
  color: #94a3b8;
  font-size: 0.62em;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.2em;
  margin-bottom: 0.35em;
  text-transform: uppercase;
}

body .cpm-credential-card__expiry strong {
  color: #0f172a;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.15em;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
}

body .cpm-credential-card__qr-wrap {
  position: static;
  display: grid;
  width: auto;
  max-width: 100%;
  flex: 0 0 auto;
  justify-items: center;
  box-sizing: border-box;
  padding: 0.4em;
  border-radius: 0.4em;
  background: #fff;
  box-shadow: 0 4px 12px rgba(12, 7, 40, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

body .cpm-credential-card__qr {
  display: block;
  width: 5.2em;
  height: 5.2em;
  object-fit: contain;
  image-rendering: pixelated;
}

body .cpm-credential-card__expiry strong[data-cpm-credential-validity],
body .cpm-credential-card__expiry strong[data-cpm-modal-validity] {
  color: #0f172a;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.15em;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
}

body .cpm-credential-card__stripe {
  height: 0.35em;
  flex: 0 0 auto;
  background: linear-gradient(90deg, #38bdf8, #6366f1, #8b5cf6);
}

body .cpm-credential-card__qr-wrap span {
  display: none;
}

body .cpm-credential-view,
body .cpm-credential-modal__body {
  container-type: inline-size;
}

body .cpm-credential-view {
  width: 100%;
  min-width: 0;
}


/* Public singles: render the credential at the exact same size as the
 * authenticated credential page (620px) so every surface is identical. */
/* Public singles: the credential lives in the sidebar; the aside is the
 * ancestor container so the card's 3.2cqi scale matches the credential page
 * (620px) at the sidebar's narrower width. */
body .cpm-prof-single__aside:has(.cpm-credential-card) {
  container-type: inline-size;
}
