/**
 * Certifications: a map of discs, a wall that spells the one you pick, and the voucher request.
 * Geist tokens. Theme key sb-home-theme (light by default), shared with Home and About.
 */
html.cx-doc { --ds-link: #0761d1; --cx-edge: #8a8a8a; --cx-off: #ececec; --cx-hue: #cef54a; --cx-ease: cubic-bezier(0.22, 1, 0.36, 1); --cx-head: var(--nv-head); scroll-padding-top: var(--nv-head); }
html.cx-doc[data-sb-theme="dark"] {
  color-scheme: dark;
  --ds-primary: #ededed; --ds-on-primary: #0a0a0a; --ds-ink: #ededed; --ds-body: #b4b4b4; --ds-mute: #a0a0a0;
  --ds-hairline: #2a2a2a; --ds-canvas: #0a0a0a; --ds-canvas-elevated: #121212; --ds-link: #52a8ff; --cx-edge: #777; --cx-off: #1c1c1c;
}
.cx-doc body { background: var(--ds-canvas); color: var(--ds-ink); line-height: 24px; -webkit-font-smoothing: antialiased; }
.cx-doc :where(h1, h2, h3, p, ul, dl, dd) { margin: 0; padding: 0; }
.cx-doc :where(ul) { list-style: none; }
.cx-doc [hidden] { display: none !important; }
.cx-doc :focus-visible { outline: 2px solid var(--ds-link); outline-offset: 2px; }
.cx-doc main:focus { outline: 0; }
.cx-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.cx-skip { position: absolute; left: 16px; top: -80px; z-index: 60; padding: 12px 16px; border-radius: var(--ds-radius-sm); background: var(--ds-primary); color: var(--ds-on-primary); }
.cx-skip:focus { top: 8px; }
.cx-doc main a:not([class]), .cx-link { color: var(--ds-link); text-decoration: underline; text-underline-offset: 3px; }

.cx { display: grid; grid-template-columns: minmax(0, 42fr) minmax(0, 58fr); }
.cx-side { position: sticky; top: var(--cx-head); display: flex; flex-direction: column; height: calc(100svh - var(--cx-head)); border-right: 1px solid var(--ds-hairline); }
.cx-wall { position: relative; flex: 1; min-height: 0; overflow: hidden; background: var(--cx-hue); transition: background-color 0.6s; touch-action: pan-y; }
.cx-wall .bd-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.cx-word { position: absolute; inset: 0; display: grid; place-content: center; font-size: 9vw; font-weight: 800; line-height: 1; letter-spacing: -0.04em; color: #171717; }
.cx-wall.is-live .cx-word { display: none; }

/* —— The one you picked —— */
.cx-detail { display: flex; flex-direction: column; justify-content: center; height: clamp(300px, 42svh, 372px); padding: 20px clamp(24px, 3.4vw, 56px); background: var(--ds-canvas); }
.cx-hint { max-width: 40ch; font-size: 18px; line-height: 28px; color: var(--ds-body); }
.cx-kind { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; font-size: 14px; color: var(--ds-body); }
.cx-kind i { width: 12px; height: 12px; margin-right: 8px; border-radius: 50%; display: inline-block; background: var(--cx-hue); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25); vertical-align: -1px; }
.cx-detail h2 { margin-top: 8px; font-size: clamp(24px, 2.3vw, 34px); font-weight: 700; line-height: 1.1; letter-spacing: -0.04em; text-wrap: balance; }
.cx-detail h2 + p { margin-top: 8px; font-size: 18px; line-height: 28px; color: var(--ds-body); }
.cx-who { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--ds-hairline); color: var(--ds-body); }
.cx-go { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.cx-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border: 1px solid transparent; border-radius: var(--ds-radius-pill); background: var(--ds-primary); color: var(--ds-on-primary); font: 500 16px/20px var(--ds-font-sans); text-decoration: none; white-space: nowrap; cursor: pointer; transition: border-color 0.2s, background-color 0.2s; }
.cx-btn:hover { text-decoration: none; background: color-mix(in srgb, var(--ds-primary) 86%, var(--ds-canvas)); }
.cx-btn--quiet { border-color: var(--cx-edge); background: transparent; color: var(--ds-ink); }
.cx-btn--quiet:hover { background: transparent; border-color: var(--ds-ink); }
.cx-close { display: none; }

/* —— The map —— */
.cx-main { padding: clamp(40px, 7svh, 72px) max(24px, calc((100vw - 1152px) / 2)) 96px clamp(24px, 4.4vw, 72px); }
.cx-doc h1 { font-size: clamp(40px, 5.2vw, 76px); font-weight: 700; line-height: 0.96; letter-spacing: -0.055em; text-wrap: balance; }
.cx-lede { margin-top: 16px; max-width: 46ch; font-size: 18px; line-height: 28px; color: var(--ds-body); }
.cx-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.cx-tools input { flex: 1 1 220px; min-width: 0; height: 48px; padding: 0 14px; border: 1px solid var(--cx-edge); border-radius: var(--ds-radius-sm); background: var(--ds-canvas-elevated); color: var(--ds-ink); font: 400 16px/22px var(--ds-font-sans); }
.cx-doc ::placeholder { color: var(--ds-body); opacity: 0.85; }
.cx-by { display: flex; border: 1px solid var(--cx-edge); border-radius: var(--ds-radius-sm); overflow: hidden; }
.cx-by button { min-height: 46px; padding: 0 16px; border: 0; background: var(--ds-canvas-elevated); color: var(--ds-ink); font: 500 14px/20px var(--ds-font-sans); cursor: pointer; }
.cx-by button + button { border-left: 1px solid var(--cx-edge); }
.cx-by button[aria-pressed="true"] { background: var(--ds-ink); color: var(--ds-canvas); }
.cx-by button:focus-visible { outline-offset: -4px; }
.cx-count { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 24px; margin-top: 14px; font-size: 14px; color: var(--ds-body); }
.cx-count b { color: var(--ds-ink); font-weight: 600; }
.cx-key { display: inline-flex; align-items: center; gap: 8px; }
.cx-key i, .cx-disc u { width: 8px; height: 8px; border-radius: 50%; background: #171717; }
html[data-sb-theme="dark"] .cx-key i { background: var(--ds-ink); }

.cx-lane { padding: 26px 0; border-top: 1px solid var(--ds-hairline); }
.cx-lane:first-child { margin-top: 12px; }
.cx-lane h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 14px; font-size: 28px; font-weight: 700; line-height: 34px; letter-spacing: -0.04em; }
.cx-lane h2 span { font-size: 16px; font-weight: 400; line-height: 24px; letter-spacing: 0; color: var(--ds-body); }
.cx-row { display: flex; flex-wrap: wrap; gap: 16px 20px; margin-top: 14px; }
.cx-set h3 { font-size: 14px; font-weight: 500; line-height: 20px; color: var(--ds-body); }
.cx-set div { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }

/* A disc turns over when you point at it, focus it or pick it */
.cx-disc { position: relative; width: var(--cx-size, 78px); height: var(--cx-size, 78px); padding: 0; border: 0; border-radius: 50%; background: none; font: 600 14px/18px var(--ds-font-mono); letter-spacing: -0.03em; cursor: pointer; perspective: 420px; }
.cx-disc > span { position: absolute; inset: 0; border-radius: 50%; transform-style: preserve-3d; transition: transform 0.55s var(--cx-ease); }
.cx-disc > span > * { position: absolute; inset: 0; display: grid; place-content: center; border-radius: 50%; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.cx-disc b { font-weight: 600; background: var(--hue); color: #171717; transition: background-color 0.4s, color 0.4s; }
.cx-disc em { font-style: normal; background: #171717; color: var(--hue); transform: rotateY(180deg); }
.cx-disc u { position: absolute; left: 50%; bottom: 14px; margin-left: -4px; text-decoration: none; }
.cx-disc em u { background: var(--hue); }
.cx-disc:is(:focus-visible, [aria-pressed="true"]) > span { transform: rotateY(180deg); }
.cx-disc[aria-pressed="true"]::after { content: ""; position: absolute; inset: -4px; border: 2px solid var(--ds-ink); border-radius: 50%; }
.cx-disc:focus-visible { outline-offset: 5px; }
.cx-disc.is-off b { background: var(--cx-off); color: var(--ds-body); }
.cx-disc.is-off u { display: none; }
html[data-sb-theme="dark"] .cx-disc em { background: #000; box-shadow: inset 0 0 0 1px var(--hue); }
@media (hover: hover) { .cx-disc:hover > span { transform: rotateY(180deg); } }
.cx-none { padding: 28px 0; }
.cx-none h2 { font-size: 28px; font-weight: 600; line-height: 34px; letter-spacing: -0.04em; }
.cx-none p { margin-top: 4px; color: var(--ds-body); }

/* —— Voucher —— */
.cx-voucher { position: relative; border-top: 1px solid var(--ds-hairline); background: var(--ds-canvas-elevated); }
.cx-voucher__in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px clamp(32px, 6vw, 96px); max-width: var(--ds-container-max); margin: 0 auto; padding: clamp(56px, 9vw, 112px) 24px; }
.cx-voucher h2 { font-size: clamp(32px, 4.2vw, 56px); font-weight: 700; line-height: 1.02; letter-spacing: -0.045em; text-wrap: balance; }
.cx-facts { margin: 28px 0 20px; border-top: 1px solid var(--ds-hairline); }
.cx-facts > div { display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 0 20px; padding: 12px 0; border-bottom: 1px solid var(--ds-hairline); }
.cx-facts dt { font-weight: 500; }
.cx-facts dd { color: var(--ds-body); }
.cx-form { scroll-margin-top: 24px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; align-content: start; }
.cx-full { grid-column: 1 / -1; }
.cx-form label { display: block; margin-bottom: 6px; font-weight: 500; line-height: 20px; }
.cx-form label span { font-weight: 400; color: var(--ds-body); }
.cx-form :is(input:not([type="hidden"]), select, textarea) { display: block; width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--cx-edge); border-radius: var(--ds-radius-sm); background: var(--ds-canvas); color: var(--ds-ink); font: 400 16px/22px var(--ds-font-sans); }
.cx-form textarea { resize: vertical; }
.cx-form .cx-trap { position: absolute; left: -9999px; }
.cx-form select.is-set { border-color: var(--ds-ink); box-shadow: inset 5px 0 0 var(--cx-hue); }
.cx-note { margin-top: 6px; font-size: 14px; line-height: 20px; color: var(--ds-body); }
.cx-msg { padding: 12px 14px; border-radius: var(--ds-radius-sm); background: #cef54a; color: #171717; }
.cx-msg:empty { display: none; }
.cx-msg[data-state="err"] { padding: 0; background: none; color: #c50000; }
html[data-sb-theme="dark"] .cx-msg[data-state="err"] { color: #ff8f8f; }
.cx-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 32px; max-width: var(--ds-container-max); margin: 0 auto; padding: 24px; font-size: 14px; color: var(--ds-body); }

html:not(.js) :is(.cx-side, .cx-tools, .cx-count, .cx-form) { display: none; }
html:not(.js) .cx { display: block; }

@media (max-width: 1000px) {
  .cx { display: block; }
  .cx-side { position: static; display: contents; }
  .cx-wall { position: sticky; top: var(--cx-head); z-index: 10; height: clamp(130px, 21svh, 190px); }
  .cx-word { font-size: 20vw; }
  .cx-main { padding: 40px 24px 72px; }
  html.cx-doc { scroll-padding-top: var(--nv-head); }
  /* what you picked rises from the bottom; the voucher form sits above it in the page, so it steps aside there */
  .cx-detail { position: fixed; z-index: 20; inset: auto 0 0; height: auto; max-height: 58svh; overflow: auto; padding: 18px 24px calc(18px + env(safe-area-inset-bottom)); border-top: 1px solid var(--ds-hairline); box-shadow: 0 -16px 40px -20px rgba(0, 0, 0, 0.3); transform: translateY(105%); visibility: hidden; transition: transform 0.35s var(--cx-ease), visibility 0.35s; }
  .cx-detail.is-up { transform: none; visibility: visible; }
  .cx-close { position: absolute; right: 14px; top: 12px; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--ds-hairline); border-radius: 50%; background: var(--ds-canvas-elevated); color: var(--ds-ink); cursor: pointer; }
  .cx-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
  .cx-kind, .cx-detail h2 { padding-right: 48px; }
  .cx-voucher { z-index: 11; }
  .cx-voucher__in { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .cx-main { padding-inline: 16px; --cx-size: 74px; }
  .cx-voucher__in { padding-inline: 16px; }
  .cx-by { flex: 1 1 100%; }
  .cx-by button { flex: 1; padding: 0 8px; }
  .cx-form { grid-template-columns: minmax(0, 1fr); }
  .cx-facts > div { grid-template-columns: minmax(0, 1fr); }
  .cx-go .cx-btn { flex: 1; }
}
@media (max-height: 520px) and (max-width: 1000px) { .cx-wall { position: relative; top: 0; } }
@media (min-width: 1001px) and (max-height: 640px) { .cx-wall { min-height: 120px; } .cx-detail { height: auto; } }
@media (prefers-reduced-motion: reduce) {
  html.cx-doc { scroll-behavior: auto; }
  .cx-doc *, .cx-doc ::after { transition: none !important; }
}
@media (forced-colors: active) { .cx-disc b, .cx-disc em { border: 1px solid; } .cx-disc[aria-pressed="true"] b { background: Highlight; } }
@media print { .cx { display: block; } .cx-side, .cx-tools, .cx-voucher { display: none; } }
