:root {
  --serif: "Source Serif Pro", "Times New Roman", Times, Georgia, serif;
  --sans: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;

  --ink: #2e2e2e;
  --link: #005850;
  --link-hover: #00423c;
  --rule: #c4c4c4;
  --chip-bg: #eef0f1;
  --chip-ink: #3a3a3a;
  --icon: #6d6d6d;

  --credly-green: #005850;
  --credly-green-dark: #00423c;
  --strip-bg: #efefef;
  --nav-rule: #cacaca;
  --field-rule: #737373;
  --shell: 1180px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); }
a:hover { color: var(--link-hover); }

img { max-width: 100%; height: auto; }

.page {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 40px 32px 0;
}

/* ---------- site navigation ---------- */

.site-nav {
  background: #fff;
  border-bottom: 1px solid var(--nav-rule);
}

.site-nav__inner {
  display: flex;
  align-items: center;
  max-width: var(--shell);
  height: 86px;
  margin: 0 auto;
  padding: 0 32px;
}

.brand { flex: none; line-height: 0; }

.brand img {
  position: relative;
  top: 4px;
  display: block;
  width: 97px;
  height: auto;
}

.search {
  position: relative;
  flex: 1 1 658px;
  min-width: 0;
  max-width: 658px;
  margin-left: 16px;
  margin-right: 24px;
}

.search__icon {
  position: absolute;
  top: 50%;
  left: 21px;
  width: 19px;
  height: 19px;
  transform: translateY(-50%);
  fill: none;
  stroke: #4a4a4a;
  stroke-width: 2;
  stroke-linecap: round;
  pointer-events: none;
}

.search input {
  width: 100%;
  height: 48px;
  padding: 0 20px 0 55px;
  border: 1px solid var(--field-rule);
  border-radius: 12px;
  background: #fff;
  color: #1b1b1b;
  font-family: inherit;
  font-size: 17px;
  appearance: none;
}

.search input::placeholder { color: #737373; opacity: 1; }
.search input::-webkit-search-cancel-button { display: none; }

.search input:focus-visible {
  outline: 2px solid var(--credly-green);
  outline-offset: 1px;
  border-color: var(--credly-green);
}

.site-nav__actions {
  display: flex;
  flex: none;
  gap: 20px;
  margin-left: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 54px;
  padding: 0 18px;
  border: 2px solid var(--credly-green);
  border-radius: 4px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.btn--ghost { background: #fff; color: var(--credly-green); }
.btn--ghost:hover { background: #edf4f2; }
.btn--solid { background: var(--credly-green); color: #fff; }
.btn--solid:hover { background: var(--credly-green-dark); border-color: var(--credly-green-dark); }

.btn:focus-visible { outline: 2px solid var(--credly-green); outline-offset: 2px; }

/* ---------- issued-to strip ---------- */

.issue-strip { background: var(--strip-bg); }

.issue-strip__inner {
  display: flex;
  align-items: center;
  gap: 29px;
  max-width: var(--shell);
  min-height: 127px;
  margin: 0 auto;
  padding: 18px 32px;
}

.issue-strip__avatar {
  display: grid;
  flex: none;
  place-items: center;
  width: 88px;
  height: 88px;
  border: 1px solid #c2c2c2;
  border-radius: 50%;
  background: #fff;
}

.issue-strip__avatar svg {
  width: 46px;
  height: 46px;
  fill: none;
  stroke: #9b9b9b;
  stroke-width: 2.4;
  stroke-linecap: round;
}

.issue-strip__text p {
  margin: 0;
  font-size: 16px;
  line-height: 28px;
  color: #1b1b1b;
}

.issued-name {
  color: var(--credly-green);
  text-decoration: underline;
}

.issue-strip__actions {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: auto;
}

.verify {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--credly-green);
  font-size: 16px;
  font-weight: 600;
  text-decoration: underline;
  white-space: nowrap;
}

.verify:hover { color: var(--credly-green-dark); }
.verify svg { width: 19px; height: 19px; flex: none; }

.celebrate { height: 48px; padding: 0 24px; }

.celebrate svg {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linejoin: round;
}

/* ---------- badge + detail columns ---------- */

.badge-layout {
  display: grid;
  grid-template-columns: 344px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.badge { display: block; width: 100%; }

.detail-col h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
}

.issuer {
  margin: 16px 0 0;
  font-size: 17px;
}

.issuer a { text-decoration: underline; }

.attributes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.attributes li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 14px;
  border-radius: 4px;
  background: var(--chip-bg);
  color: var(--chip-ink);
  font-size: 15px;
  white-space: nowrap;
}

.attributes svg {
  width: 15px;
  height: 15px;
  flex: none;
  fill: none;
  stroke: var(--icon);
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lede {
  margin: 28px 0 0;
  font-size: 17px;
  line-height: 1.65;
}

.learn-more { margin: 24px 0 0; font-size: 17px; }
.learn-more a { text-decoration: underline; }

/* ---------- detail column blocks ---------- */

.block { margin-top: 46px; }

.block h2 {
  margin: 0 0 16px;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}

/* earning criteria */

.criteria {
  margin: 0;
  padding-left: 20px;
  list-style: disc;
}

.criteria > li {
  position: relative;
  margin-bottom: 14px;
  padding-right: 36px;
  font-size: 16.5px;
  line-height: 1.55;
}

.criteria > li:last-child { margin-bottom: 0; }

.ext-link {
  position: absolute;
  top: 2px;
  right: 0;
  line-height: 0;
}

.ext-link svg { width: 16px; height: 16px; }

.course { text-decoration: none; }

.criteria svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.course svg {
  width: 14px;
  height: 14px;
  margin-left: 7px;
  vertical-align: -2px;
}

/* skills */

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.skills a {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  font-size: 15px;
  text-decoration: none;
  transition: background-color .12s ease, border-color .12s ease;
}

.skills a:hover { background: #f2f5f4; border-color: #98a3a0; }

/* standards */

.entry { margin-bottom: 26px; }
.entry:last-child { margin-bottom: 0; }

.entry h3 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.4;
}

.entry h3 a { text-decoration: underline; }

.entry p {
  margin: 0;
  font-size: 16.5px;
  line-height: 1.55;
}

/* endorsements */

.endorsement {
  display: flex;
  align-items: flex-start;
  gap: 30px;
  padding: 26px 28px;
  border: 1px solid var(--rule);
  border-radius: 4px;
}

.endorsement img { width: 40px; flex: none; margin-top: 6px; }

.endorsement p {
  margin: 0;
  font-size: 16.5px;
  line-height: 1.55;
}

.endorsement__name { margin-bottom: 2px !important; }
.endorsement__name a { text-decoration: underline; }

/* ---------- full width sections ---------- */

.wide { margin-top: 70px; }

.wide__title {
  margin: 0;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  color: var(--ink);
}

.wide__title::after {
  content: "";
  display: block;
  width: 64px;
  height: 4px;
  margin: 18px auto 0;
  background: #747376;
}

/* occupations */

.cards {
  display: grid;
  gap: 20px;
  margin-top: 36px;
}

.card {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px;
  border: 1px solid var(--rule);
  border-radius: 4px;
}

.card__body h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
}

.card__body p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.45;
}

.card__cta { flex: none; height: 44px; padding: 0 24px; margin-left: auto; }

/* related */

.related {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 36px;
  border-top: 1px solid var(--rule);
}

.related__item {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 24px;
  padding: 28px 20px;
  border-left: 1px solid var(--rule);
}

.related__item:first-child { border-left: 0; }

.related__item img { width: 110px; flex: none; }

.related__item span {
  width: 165px;
  font-size: 17px;
  line-height: 1.5;
}

/* ---------- footer ---------- */

.site-footer {
  margin-top: 72px;
  border-top: 1px solid var(--rule);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0;
  padding: 42px 32px;
  list-style: none;
}

.footer-links li { display: flex; align-items: center; }

.footer-links li:not(:first-child)::before {
  content: "|";
  margin: 0 14px;
  color: var(--rule);
}

.footer-links a {
  font-size: 15px;
  text-decoration: none;
}

.footer-links a:hover { text-decoration: underline; }

/* ---------- network error toast ---------- */

.net-toast {
  position: fixed;
  top: 104px;
  left: 50%;
  z-index: 100;
  display: flex;
  align-items: flex-start;
  gap: 13px;
  width: min(440px, calc(100vw - 32px));
  padding: 16px 14px 16px 18px;
  border: 1px solid #e5cbc8;
  border-left: 4px solid #b3261e;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(0, 0, 0, .19);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -14px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}

.net-toast.is-open {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.net-toast.is-nudge { animation: net-toast-nudge .3s ease; }

@keyframes net-toast-nudge {
  0%, 100% { transform: translate(-50%, 0); }
  30% { transform: translate(calc(-50% - 6px), 0); }
  70% { transform: translate(calc(-50% + 6px), 0); }
}

.net-toast__icon {
  width: 21px;
  height: 21px;
  flex: none;
  margin-top: 1px;
  fill: none;
  stroke: #b3261e;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.net-toast__body { flex: 1 1 auto; }

.net-toast__title {
  margin: 0 0 3px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.net-toast__text {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.45;
  color: #5a5a5a;
}

.net-toast__close {
  flex: none;
  padding: 0 4px;
  border: 0;
  background: none;
  color: #8a8a8a;
  font-family: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.net-toast__close:hover { color: #2e2e2e; }

@media (prefers-reduced-motion: reduce) {
  .net-toast { transition: opacity .16s ease, visibility .16s; }
  .net-toast.is-nudge { animation: none; }
}

/* ---------- responsive ---------- */

@media (max-width: 980px) {
  .search { margin-right: 16px; }
  .site-nav__actions { gap: 14px; }
}

@media (max-width: 900px) {
  .page { padding: 32px 22px 0; }

  .badge-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }

  .badge-col { max-width: 344px; }
  .detail-col h1 { font-size: 27px; }
  .wide__title { font-size: 25px; }

  .related { grid-template-columns: minmax(0, 1fr); }
  .related__item {
    justify-content: flex-start;
    border-left: 0;
    border-top: 1px solid var(--rule);
  }
  .related__item:first-child { border-top: 0; }
}

@media (max-width: 820px) {
  .site-nav__inner { height: 76px; padding: 0 22px; }
  .search { display: none; }
  .issue-strip__inner { padding: 18px 22px; }
  .net-toast { top: 92px; }
}

@media (max-width: 700px) {
  .card { flex-direction: column; align-items: flex-start; gap: 18px; }
  .card__cta { margin-left: 0; }
}

@media (max-width: 640px) {
  .issue-strip__inner { flex-wrap: wrap; }
  .issue-strip__actions { width: 100%; margin-left: 0; }

  /* wrapped rows should not start with a stray separator */
  .footer-links { gap: 10px 18px; padding: 32px 22px; }
  .footer-links li:not(:first-child)::before { display: none; }
}

@media (max-width: 520px) {
  .detail-col h1 { font-size: 24px; }
  .lede, .criteria > li, .entry p, .endorsement p { font-size: 16px; }
  .related__item span { width: auto; }
}

@media (max-width: 460px) {
  .brand img { width: 84px; }
  .btn { height: 44px; padding: 0 12px; font-size: 14px; }
  .site-nav__actions { gap: 10px; }
  .issue-strip__inner { gap: 16px; }
  .issue-strip__avatar { width: 64px; height: 64px; }
  .issue-strip__avatar svg { width: 34px; height: 34px; }
  .issue-strip__text p { font-size: 15px; line-height: 25px; }
}
