:root {
  color-scheme: light;
  --page-top: #f8f6f4;
  --page-bottom: #ffe6d4;
  --surface: #ffffff;
  --ink: #1e1f1e;
  --ink-strong: #0d0d0d;
  --muted: rgba(13, 13, 13, 0.52);
  --line: rgba(13, 13, 13, 0.16);
  --line-hover: rgba(13, 13, 13, 0.52);
  --orange: #ff6d34;
  --orange-hover: #fe4a11;
  --orange-disabled: #ffc8a8;
  --green: #44b58f;
  --link: #29a07c;
  --error: #f1416c;
  --error-text: #db3b62;
  --font-sans: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --r-md: 5px;
}
* { box-sizing: border-box; }
html { background: var(--page-top); }
body {
  margin: 0; min-height: 100vh;
  background: linear-gradient(180deg, var(--page-top) 0%, var(--page-top) 88px, var(--page-bottom) 100%);
  color: var(--ink-strong); font-family: var(--font-sans); font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1536px; margin: 0 auto; padding-inline: 100px; }
@media (max-width: 1100px) { .wrap { padding-inline: 50px; } }
@media (max-width: 600px) { .wrap { padding-inline: 20px; } }
header.site { padding-block: 15px; }
header.site .logo { display: block; width: 91px; height: 58px; }
main { padding-block: 50px 100px; }
@media (max-width: 767px) { main { padding-top: 30px; } }
.screen[hidden] { display: none !important; }
.hero { display: grid; grid-template-columns: minmax(0, 630px) minmax(0, 565px); justify-content: space-between; align-items: start; column-gap: 70px; row-gap: 50px; }
.col-form { display: flex; flex-direction: column; gap: 50px; min-width: 0; }
@media (max-width: 767px) { .col-form { gap: 30px; } }
.col-card { display: flex; flex-direction: column; gap: 30px; min-width: 0; }
.intro { display: flex; flex-direction: column; gap: 20px; }
h1, h2 { margin: 0; font-weight: 500; font-size: 52px; line-height: 56px; letter-spacing: 0; color: var(--ink); text-wrap: pretty; }
.intro p { margin: 0; max-width: 62ch; font-size: 16px; line-height: 24px; }
form { display: flex; flex-direction: column; gap: 20px; }
#form { gap: 30px; }
.field { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.label { font-size: 14px; line-height: 18px; font-weight: 500; color: var(--ink); }
.input {
  height: 50px; width: 100%; padding: 10px 20px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--surface);
  font: 400 16px/20px var(--font-sans); color: var(--ink-strong); outline: none; transition: border-color .15s;
}
.input::placeholder { color: var(--muted); }
.input:hover { border-color: var(--line-hover); }
.input:focus { border-color: var(--green); }
.field.has-error .input { border-color: var(--error); }
.err { font-size: 14px; line-height: 18px; color: var(--error-text); }
.err[hidden] { display: none; }
.field[hidden] { display: none; }
.err a { color: inherit; text-decoration: underline; }
#f-email { margin-top: -10px; } /* 20 px between the name and the email field (the form gap is 30) */
.help { margin: 0; font-size: 14px; line-height: 18px; color: var(--muted); }
.cert { display: block; width: 100%; height: auto; aspect-ratio: 1684 / 1190; border-radius: 10px; background: #ffc64a; }
.cta-block { display: flex; flex-direction: column; gap: 15px; }
.btn, .ghost {
  height: 50px; width: 100%; border-radius: var(--r-md); display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 10px 20px;
  font: 500 14px/20px var(--font-mono); letter-spacing: -0.01em; text-transform: uppercase; cursor: pointer; text-decoration: none; color: var(--ink-strong); white-space: nowrap;
  transition: background-color .15s, border-color .15s;
}
.btn { border: 0; background: var(--orange); }
.btn:hover { background: var(--orange-hover); }
.btn:disabled { background: var(--orange-disabled); color: rgba(13, 13, 13, 0.4); cursor: default; }
.btn .spin { width: 20px; height: 20px; display: none; animation: spin 1s linear infinite; }
.btn.loading .spin { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }
.ghost { border: 1px solid rgba(13, 13, 13, 0.24); background: transparent; }
.ghost:hover { border-color: var(--line-hover); }
.btn:focus-visible, .ghost:focus-visible, .link-light:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.ico { width: 20px; height: 20px; flex: none; }
.legal { margin: 0; font-size: 14px; line-height: 18px; color: var(--muted); }
.legal a { color: var(--link); text-decoration: none; }
.legal a:hover { color: #29a07c; text-decoration: underline; }
.legal a:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.actions { display: flex; flex-direction: column; gap: 10px; }
.actions .row { display: flex; gap: 10px; }
.actions .row > * { flex: 1 1 0; width: auto; }
.links { margin-top: 20px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
@media (max-width: 767px) { .links { margin-top: 10px; } }
.link-light { display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; padding: 0; height: 20px; font: 400 14px/20px var(--font-sans); color: rgba(13, 13, 13, 0.52); cursor: pointer; }
.link-light span { text-decoration: underline; }
.link-light:hover { color: #29a07c; }
@media (max-width: 1100px) {
  .hero { grid-template-columns: minmax(0, 1fr); max-width: 630px; }
  #screen-form .hero { margin-inline: auto; row-gap: 50px; }
  #screen-form .col-form { display: contents; }
  #screen-form .intro { order: 1; } #screen-form .col-card { order: 2; } #screen-form form { order: 3; }
}
@media (max-width: 767px) { #screen-form .hero { row-gap: 30px; } }
@media (max-width: 1023px) { h1, h2 { font-size: 36px; line-height: 40px; } }
@media (max-width: 600px) {
  .actions .row { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { .input, .btn, .next-card { transition: none; } .btn .spin { animation: none; } }
@media (min-width: 1101px) { .hero { grid-template-columns: minmax(0, 542px) minmax(0, 678px); } }
@media (min-width: 1101px) {
  #screen-form .col-card { align-self: start; padding-top: 10px; }
  #screen-form .cta-block { position: relative; }
  #screen-form .cta-block .legal { position: absolute; top: calc(100% + 15px); left: 0; right: 0; }
}
.next { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.next-card { display: flex; align-items: flex-start; gap: 20px; padding: 20px; border-radius: var(--r-md); background: rgba(13, 13, 13, 0.04); color: inherit; text-decoration: none; transition: background-color .15s; }
.next-card:hover { background: rgba(13, 13, 13, 0.06); }
.next-card:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.next-ico { width: 40px; height: 40px; flex: none; }
.next-body { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; min-width: 0; }
.next-text { display: flex; align-items: center; min-height: 40px; margin: 0; font-weight: 500; font-size: 18px; line-height: 22px; color: #000; text-wrap: pretty; }
.next-link { display: inline-flex; align-items: center; gap: 5px; font: 400 14px/20px var(--font-sans); color: var(--ink-strong); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 600px) { .next { grid-template-columns: minmax(0, 1fr); } }
.saved { display: none; }
#screen-result[data-layout="single"] .hero { display: flex; flex-direction: column; align-items: center; gap: 0; max-width: none; text-align: center; }
#screen-result[data-layout="single"] .intro-wrap, #screen-result[data-layout="single"] .col-card { display: contents; }
#screen-result[data-layout="single"] .intro { order: 1; } #screen-result[data-layout="single"] .cert { order: 2; } #screen-result[data-layout="single"] .saved { order: 3; } #screen-result[data-layout="single"] .actions { order: 4; }
#screen-result[data-layout="single"] .intro, #screen-result[data-layout="single"] .cert, #screen-result[data-layout="single"] .saved, #screen-result[data-layout="single"] .actions { width: var(--fit, 695px); max-width: 100%; }
#screen-result[data-layout="single"] h2 { font-size: 36px; line-height: 40px; }
#h-result:focus { outline: none; }
@media (max-width: 1023px) { #screen-result[data-layout="single"] h2 { font-size: 24px; line-height: 30px; } }
#screen-result[data-layout="single"] .cert, #screen-result[data-layout="single"] .saved { margin-top: 30px; }
@media (max-width: 767px) { #screen-result[data-layout="single"] .cert, #screen-result[data-layout="single"] .saved { margin-top: 20px; } }
#screen-result[data-layout="single"] .actions { margin-top: 15px; }
#screen-result[data-layout="single"] .saved { display: flex; align-items: flex-start; gap: 10px; padding: 15px; border-radius: 5px; background: rgba(255, 255, 255, 0.9); text-align: left; }
.saved-info { flex: none; width: 18px; height: 18px; color: #1e1f1e; }
.saved p { margin: 0; font-size: 14px; line-height: 18px; color: var(--ink-strong); }
#screen-result[data-layout="single"] .links { margin-top: 10px; }
#screen-result[data-layout="single"] .next-wrap { order: 6; width: var(--fit, 695px); max-width: 100%; margin-top: 30px; container-type: inline-size; }
@media (max-width: 767px) { #screen-result[data-layout="single"] .next-wrap { margin-top: 20px; } }
#screen-result[data-layout="single"] .next { width: auto; margin-top: 0; text-align: left; }
#screen-result[data-layout="single"] .next-link { font-size: 16px; line-height: 20px; }
.next-item { display: grid; }
@container (max-width: 599px) {
  .next { grid-template-columns: minmax(0, 1fr); }
  .next-card { align-items: center; }
  .next-body { flex-direction: row; align-items: center; justify-content: space-between; gap: 20px; width: 100%; }
  .next-text { min-height: 0; }
  .next-link { flex: none; }
}
@media (max-width: 600px) {
  #screen-result[data-layout="single"] .next-card { align-items: flex-start; }
  #screen-result[data-layout="single"] .next-body { flex-direction: column; align-items: flex-start; gap: 15px; }
}
main:has(#screen-result[data-layout="single"]:not([hidden])) { padding-top: 10px; }
.confetti { position: fixed; inset: 0; z-index: 30; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; left: 0; top: 0; border-radius: 2px; will-change: transform, opacity; }
.confetti i:nth-child(5n+1) { background: #ff6d34; } .confetti i:nth-child(5n+2) { background: #7eccfb; } .confetti i:nth-child(5n+3) { background: #ffc64a; } .confetti i:nth-child(5n+4) { background: #44b58f; } .confetti i:nth-child(5n) { background: #847fd5; }
.confetti i:nth-child(4n+1) { width: 8px; height: 12px; } .confetti i:nth-child(4n+2) { width: 12px; height: 8px; border-radius: 50%; } .confetti i:nth-child(4n+3) { width: 6px; height: 14px; } .confetti i:nth-child(4n) { width: 10px; height: 10px; border-radius: 50%; }
@media (prefers-reduced-motion: reduce) { .confetti { display: none; } }
.survey { width: 100%; padding: 30px; border-radius: 10px; background: var(--surface); text-align: left; }
.survey form { display: flex; flex-direction: column; gap: 20px; }
.survey form[hidden] { display: none; }
.survey-head { display: flex; flex-direction: column; gap: 10px; }
.survey-body { display: flex; flex-direction: column; gap: 20px; }
.survey-toggle { all: unset; display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 10px; row-gap: 5px; width: 100%; box-sizing: border-box; font: inherit; color: inherit; cursor: default; }
.survey-toggle .chev { display: none; flex: none; width: 20px; height: 20px; margin-left: auto; transition: transform .2s; }
.float .survey-toggle { cursor: pointer; }
.float .survey-toggle .chev { display: block; }
.float .survey-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }
.float .survey-toggle:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 2px; }
.float .survey-body[hidden] { display: none; }
.survey-badge { display: flex; grid-row: 2; grid-column: 1; justify-self: start; align-items: center; gap: 5px; font: 400 12px/16px var(--font-mono); letter-spacing: -0.01em; text-transform: uppercase; color: var(--muted); }
.survey-badge svg { flex: none; width: 15px; height: 15px; }
.survey h3 { margin: 0; font-weight: 500; font-size: 18px; line-height: 20px; color: var(--ink); }
.survey p { margin: 0; font-size: 14px; line-height: 18px; color: var(--ink-strong); }
.rating { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.rating legend { padding: 0; margin-bottom: 10px; }
.rating-scale { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
.rating-scale label { position: relative; display: grid; place-items: center; height: 40px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); font: 500 14px/18px var(--font-sans); color: var(--ink-strong); cursor: pointer; transition: border-color .15s, background-color .15s; }
.rating-scale label:hover { border-color: var(--line-hover); }
.rating-scale input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.rating-scale label:has(input:checked) { border-color: var(--ink-strong); background: rgba(13, 13, 13, 0.06); }
.rating-scale label:has(input:focus-visible) { outline: 2px solid var(--green); outline-offset: 2px; }
.rating-ends { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; line-height: 16px; color: var(--muted); }
.label-opt { display: flex; gap: 5px; }
.label-opt span { font-weight: 400; letter-spacing: 0.01em; color: var(--muted); }
.survey textarea.input { display: block; height: 100px; min-height: 100px; max-height: 448px; padding: 10px 15px; border-radius: 5px; font-size: 14px; line-height: 18px; resize: none; }
.survey-send { height: 40px; padding: 10px 15px; font-size: 12px; line-height: 18px; }
.survey-send:disabled { cursor: default; color: rgba(13, 13, 13, 0.32); border-color: rgba(13, 13, 13, 0.12); }
.survey-done { display: flex; gap: 15px; align-items: flex-start; outline: none; }
.survey-done[hidden] { display: none; }
.survey-done .done-ico { flex: none; width: 72px; height: 72px; display: block; }
.survey-done .survey-head { flex: 1; min-width: 0; padding-right: 40px; }
.x-btn { position: absolute; top: calc(var(--pad, 30px) - 10px); right: calc(var(--pad, 30px) - 15px); width: 40px; height: 40px; border: 0; border-radius: 5px; background: transparent; display: grid; place-items: center; cursor: pointer; color: var(--ink-strong); padding: 10px; transition: background-color .15s; }
.x-btn:hover { background: rgba(13, 13, 13, 0.06); }
.x-btn svg { width: 20px; height: 20px; }
.x-btn:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.survey h3 { padding-right: 40px; }
.float .survey { padding: 0; background: none; }
#survey-box[hidden] { display: none; }
#survey-box { position: relative; --pad: 30px; animation: fade-in .3s ease-out; }
.float { position: fixed; z-index: 20; right: max(30px, env(safe-area-inset-right, 0px)); bottom: 0; width: 380px; max-height: calc(100vh - 120px); overflow: auto; padding: 30px; padding-bottom: calc(30px + env(safe-area-inset-bottom, 0px)); border-radius: 10px 10px 0 0; background: var(--surface); --pad: 30px; animation: fade-in .3s ease-out; }
.float[hidden] { display: none; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
#screen-result[data-layout="single"] #survey-box { order: 5; width: var(--fit, 695px); max-width: 100%; margin-top: 30px; }
@media (max-width: 767px) { #screen-result[data-layout="single"] #survey-box { margin-top: 20px; } }
@media (prefers-reduced-motion: reduce) { .float, #survey-box { animation: none; } .rating-scale label { transition: none; } }
/* Public certificate page (view.html, <body class="view">): read-only, so no survey, no "add to profile" / share buttons, no info icon */
.view #survey-box, .view #float, .view #add-profile, .view .actions, .view .saved-info, .view .saved p { display: none; }
#screen-result.empty .col-card, #screen-result.empty .saved, #screen-result.empty .actions { display: none !important; }
/* Public link of the certificate: one row right under the certificate: link icon, the link (underlined), a Copy icon button */
.public { display: none; }
#screen-result[data-layout="single"] .public { order: 3; display: flex; align-items: center; justify-content: center; gap: 5px; width: var(--fit, 695px); max-width: 100%; margin-top: 10px; padding: 0; color: var(--ink-strong); }
#screen-result[data-layout="single"] .public[hidden], .view .public { display: none; }
#screen-result[data-layout="single"] .public:not([hidden]) + .saved { margin-top: 30px; }
@media (max-width: 767px) { #screen-result[data-layout="single"] .public:not([hidden]) + .saved { margin-top: 20px; } }
.public-label { flex: none; font-size: 14px; line-height: 20px; color: var(--muted); }
.public-url { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 400 14px/20px var(--font-sans); color: var(--ink-strong); text-decoration: underline; text-underline-offset: 3px; }
.public-url:hover { color: #29a07c; }
/* Copy button = Design system (Promo) "Button_Copy", Size=sm: 20 x 20, heroicons-outline/document-duplicate (check when copied; the DS component itself uses the link icon, the copy icon was asked for explicitly), #0D0D0D, hover #29A07C, tooltip #4B4C4B / #F8F6F4, Inter Tight 14/18, padding 5/10, radius 5, 13 px above */
.icon-btn { position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-left: 5px; border: 0; border-radius: 0; background: none; padding: 0; color: #0d0d0d; cursor: pointer; }
.icon-btn:hover, .icon-btn.done { color: #29a07c; }
.icon-btn .ico { width: 20px; height: 20px; }
.icon-btn .ico-done, .icon-btn.done .ico-copy { display: none; }
.icon-btn.done .ico-done { display: block; color: #0d0d0d; }
.icon-btn::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 13px); transform: translateX(-50%); padding: 5px 10px; border-radius: 5px; background: #4b4c4b; color: #f8f6f4; font: 400 14px/18px var(--font-sans); white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .12s; z-index: 5; }
.icon-btn::before { content: ""; position: absolute; left: 50%; bottom: calc(100% + 7px); transform: translateX(-50%); border: 6px solid transparent; border-top-color: #4b4c4b; border-bottom-width: 0; opacity: 0; pointer-events: none; transition: opacity .12s; z-index: 5; }
.icon-btn:hover::after, .icon-btn:hover::before, .icon-btn:focus-visible::after, .icon-btn:focus-visible::before, .icon-btn.done::after, .icon-btn.done::before { opacity: 1; }
.public-url:focus-visible, .icon-btn:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
/* Public page: the info line under the certificate, plain text (no box): "Stape Relay 2026 • Certificate ID: … • Issued: …" */
.view #screen-result[data-layout="single"] .saved { background: none; padding: 0; margin-top: 10px; justify-content: center; text-align: center; }
/* Public page: a light bar under the certificate (Stape style): "✓ Verified · ID … [copy] · Issued …" + Download PDF / Download PNG */
.vbar { display: none; }
.view #screen-result[data-layout="single"] .saved { display: block; padding: 0; margin-top: 10px; background: none; }
.view .vbar:not([hidden]) { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; padding: 15px 20px; border-radius: 5px; background: rgba(255, 255, 255, 0.9); color: var(--ink-strong); font: 400 14px/20px var(--font-sans); text-align: left; } /* the white bar under the certificate: info on the left, downloads on the right */
#v-id { font-weight: 500; } /* Inter Tight has Regular and Medium only, Medium is the closest to semibold */
.v-info { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.v-actions { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px; }
/* Badge = Design system (Promo) "Badge": Badge=light green, Icon=true, Size=sm (fill #B2E8D1, radius 3, padding 2/5, gap 5; icon heroicons-mini/check 15 px #1A8164; text IBM Plex Mono Regular 12/16, -1%, uppercase, #0D0D0D = style other/caption-sm) */
.v-badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 5px; border-radius: 3px; background: #b2e8d1; color: var(--ink-strong); font: 400 12px/16px var(--font-mono); letter-spacing: -0.01em; text-transform: uppercase; }
.v-check { width: 15px; height: 15px; flex: none; color: #1a8164; }
.v-sep { flex: none; width: 4px; height: 4px; border-radius: 50%; background: var(--muted); }
.vbar .icon-btn { margin-left: 0; }
/* Button = Design system (Promo) "Button": Type=secondary, Size=sm: height 40, padding 10/15, IBM Plex Mono Medium 12/18 uppercase, border #0D0D0D 24% (hover 52%), radius 5 */
.ghost.sm { width: auto; height: 40px; padding: 10px 15px; font-size: 12px; line-height: 18px; letter-spacing: 0; gap: 5px; }
/* Public page: the whole page (certificate, bar, cards) has to fit one screen, so the cards are a bit tighter */
.view .next-card { padding: 15px 20px; gap: 15px; }
.view .next-body { gap: 10px; }
/* Wide screens: the bar stays one row (info on the left may wrap inside itself), so the page keeps its height when the certificate gets narrower */
@container (min-width: 560px) { .view .vbar:not([hidden]) { flex-wrap: nowrap; } .view .v-actions { flex: none; } .view .v-info { flex: 1 1 auto; min-width: 0; } } /* wide enough: info left, buttons right in one row; narrower: buttons go under the info */
.view #screen-result[data-layout="single"] .next-wrap { margin-top: 40px; }

.view .saved { container-type: inline-size; }

@container (max-width: 699px) { .v-sep-end { display: none; } .v-issued { flex-basis: 100%; } } /* narrow bar: the date drops to its own line, no dot left hanging at the end of the first line */
