/*
  SerenityNow signup box, version 1.0
  Self contained. Every class starts with "snj" so nothing on the site is touched.
  Rules are written one level deeper (".snj .snj-thing") on purpose, so the site's own
  rules such as ".hm-close p" and ".hm-close h2" cannot restyle anything in the box.
  Colors use the site variables when they exist and fall back to the brand values.
  Save as /assets/sn-signup.css
*/

[data-sn-join] {
  display: block;
  width: 100%;
  scroll-margin-top: 96px;
  font-family: inherit;
}
/* Hold the space while the script loads so the page does not jump */
[data-sn-join]:empty { min-height: 320px; }
[data-sn-join][data-variant="dark"]:empty { min-height: 190px; }

.snj,
.snj *,
.snj *::before,
.snj *::after { box-sizing: border-box; }

.snj {
  text-align: left;
  color: var(--navy, #183642);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Card (home page top) ---------- */
.snj.snj--card {
  max-width: 560px;
  padding: 26px 28px 22px;
  background: #fff;
  border: 1px solid var(--border, #e2ecea);
  border-radius: 22px;
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(24, 54, 66, .06), 0 10px 28px rgba(24, 54, 66, .09));
}

.clerk-frame {
  display: block;
  width: 100%;
  height: 420px;
  border: 0;
  background: transparent;
}

/* ---------- Dark (home page closing card) ---------- */
.snj.snj--dark {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  color: #fff;
}

.snj .snj-title {
  margin: 0 0 8px;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--navy, #183642);
}
.snj--dark .snj-title { color: #fff; }
.snj .snj-title:focus { outline: none; }

.snj .snj-body {
  max-width: none;
  margin: 0 0 18px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink2, #3d5560);
}
.snj--dark .snj-body { max-width: 460px; margin: 0 auto 18px; color: var(--mint, #d1ebe1); }
.snj .snj-body strong { font-weight: 700; color: inherit; overflow-wrap: anywhere; }
.snj--dark .snj-body strong { color: #fff; }

/* ---------- Fields ---------- */
.snj .snj-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 14px;
}
.snj--dark .snj-fields { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); text-align: left; }
.snj .snj-fields--single { grid-template-columns: minmax(0, 1fr); }
.snj--dark .snj-fields--single { max-width: 280px; margin: 0 auto; }

.snj .snj-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.snj .snj-field label {
  margin: 0;
  font-size: 14px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--navy, #183642);
}
.snj--dark .snj-field label { color: #fff; }

.snj .snj-input,
.snj .snj-select {
  display: block;
  width: 100%;
  height: 50px;
  margin: 0;
  padding: 0 14px;
  border: 1.5px solid #5b7179;
  border-radius: 12px;
  background-color: #fff;
  color: var(--navy, #183642);
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  -webkit-appearance: none;
  appearance: none;
}
.snj .snj-input::placeholder { color: #5b7179; opacity: 1; }
.snj .snj-select {
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M2 4.5l5 5 5-5' fill='none' stroke='%23183642' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px 14px;
  cursor: pointer;
}
.snj .snj-input:focus,
.snj .snj-select:focus {
  border-color: var(--navy, #183642);
  outline: 3px solid var(--focus, #459ab8);
  outline-offset: 2px;
}
.snj--dark .snj-input:focus,
.snj--dark .snj-select:focus { outline-color: var(--mint, #d1ebe1); }
.snj .snj-input[aria-invalid="true"],
.snj .snj-select[aria-invalid="true"] { border-color: #a12626; }
.snj--dark .snj-input[aria-invalid="true"],
.snj--dark .snj-select[aria-invalid="true"] { border-color: #ffc2b8; box-shadow: 0 0 0 2px #ffc2b8; }

.snj .snj-input--code {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: .32em;
  text-align: center;
  padding: 0 14px 0 calc(14px + .32em);
}

/* Spam trap, never visible */
.snj .snj-hp {
  position: absolute !important;
  left: -10000px !important;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Messages ---------- */
.snj .snj-err {
  max-width: none;
  margin: 12px 0 0;
  font-size: 14.5px;
  line-height: 1.4;
  font-weight: 700;
  color: #a12626;
}
.snj .snj-err:empty { margin: 0; }
.snj--dark .snj-err { color: #ffc2b8; }

.snj .snj-status {
  max-width: none;
  margin: 12px 0 0;
  font-size: 14.5px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--ink2, #3d5560);
}
.snj .snj-status:empty { margin: 0; }
.snj--dark .snj-status { color: var(--mint, #d1ebe1); }

.snj .snj-demo {
  display: inline-block;
  max-width: none;
  margin: 0 0 12px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--mint, #d1ebe1);
  color: var(--navy, #183642);
  font-size: 13px;
  line-height: 1.4;
  font-weight: 700;
}

/* ---------- Buttons ---------- */
.snj .snj-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 52px;
  margin: 18px 0 0;
  padding: 15px 28px;
  border: 0;
  border-radius: 999px;
  background: var(--navy, #183642);
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease;
}
.snj .snj-btn:hover { background: #0f2933; }
.snj .snj-btn:focus-visible { outline: 3px solid var(--focus, #459ab8); outline-offset: 3px; }
.snj .snj-btn[aria-disabled="true"] { cursor: progress; background: #3d5560; }

.snj--dark .snj-btn {
  width: auto;
  min-width: 260px;
  background: #fff;
  color: var(--navy, #183642);
}
.snj--dark .snj-btn:hover { background: var(--bg, #eef4f3); }
.snj--dark .snj-btn:focus-visible { outline-color: var(--mint, #d1ebe1); }
.snj--dark .snj-btn[aria-disabled="true"] { background: var(--mint, #d1ebe1); color: var(--navy, #183642); }

/* Text style buttons and links */
.snj .snj-link,
.snj .snj-fine a {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: #1d6783;
  font-family: inherit;
  font-size: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.snj .snj-link:hover,
.snj .snj-fine a:hover { text-decoration-thickness: 2px; }
.snj .snj-link:focus-visible,
.snj .snj-fine a:focus-visible { outline: 3px solid var(--focus, #459ab8); outline-offset: 3px; border-radius: 4px; }
.snj .snj-link[aria-disabled="true"] { color: var(--ink2, #3d5560); font-weight: 600; text-decoration: none; cursor: default; }
.snj--dark .snj-link,
.snj--dark .snj-fine a { color: #fff; }
.snj--dark .snj-link[aria-disabled="true"] { color: var(--mint, #d1ebe1); }
.snj--dark .snj-link:focus-visible,
.snj--dark .snj-fine a:focus-visible { outline-color: var(--mint, #d1ebe1); }

.snj .snj-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  max-width: none;
  margin: 16px 0 0;
  font-size: 15px;
  line-height: 1.4;
}
.snj--dark .snj-links { justify-content: center; }

.snj .snj-fine {
  max-width: none;
  margin: 14px 0 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink2, #3d5560);
}
.snj--dark .snj-fine { color: var(--mint, #d1ebe1); }

/* ---------- Done ---------- */
.snj .snj-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0 0 12px;
  border-radius: 50%;
  background: var(--mint, #d1ebe1);
}
.snj .snj-check svg { display: block; width: 20px; height: 20px; }
.snj .snj-done .snj-body { margin-bottom: 0; }

/* Text for screen readers only */
.snj-sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- Small screens ---------- */
@media (max-width: 560px) {
  .snj.snj--card { padding: 22px 18px 18px; border-radius: 18px; }
  .snj .snj-title { font-size: 22px; }
  .snj .snj-fields,
  .snj--dark .snj-fields { grid-template-columns: minmax(0, 1fr); }
  .snj--dark .snj-btn { width: 100%; min-width: 0; }
  [data-sn-join]:empty { min-height: 490px; }
  [data-sn-join][data-variant="dark"]:empty { min-height: 320px; }
}

@media (prefers-reduced-motion: reduce) {
  .snj .snj-btn { transition: none; }
}

@media (forced-colors: active) {
  .snj .snj-btn { border: 2px solid ButtonText; }
  .snj .snj-input,
  .snj .snj-select { border-color: ButtonText; }
}
