:root {
  color-scheme: light;
  --nx-ink: #191a17;
  --nx-ink-soft: #262821;
  --nx-paper: #f3f0e8;
  --nx-card: #fbfaf6;
  --nx-white: #ffffff;
  --nx-line: rgb(25 26 23 / 13%);
  --nx-muted: #74766f;
  --nx-lime: #dfff63;
  --nx-coral: #ff7051;
  --nx-danger: #b43a2b;
  --nx-focus: rgb(112 134 30 / 27%);
}

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

html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
}

body {
  color: var(--nx-ink);
  background:
    linear-gradient(rgb(25 26 23 / 2.8%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(25 26 23 / 2.8%) 1px, transparent 1px),
    var(--nx-paper);
  background-size: 42px 42px;
  font-family: Manrope, Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before,
body::after {
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

body::before {
  top: -17rem;
  right: -13rem;
  width: 35rem;
  height: 35rem;
  background: radial-gradient(circle, rgb(223 255 99 / 48%), rgb(223 255 99 / 0%) 68%);
}

body::after {
  bottom: -19rem;
  left: -15rem;
  width: 39rem;
  height: 39rem;
  background: radial-gradient(circle, rgb(255 112 81 / 13%), rgb(255 112 81 / 0%) 70%);
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
  text-underline-offset: .18em;
}

.nx-page {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 1.5rem;
  width: min(100%, 82rem);
  min-height: 100vh;
  margin: 0 auto;
  padding: 1.5rem 2rem 1.25rem;
}

.nx-topbar,
.nx-page-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nx-topbar {
  min-height: 3.25rem;
}

.nx-brand {
  display: inline-flex;
  align-items: center;
  gap: .8rem;
}

.nx-brand img {
  display: block;
  width: 2.35rem;
  height: 2.35rem;
}

.nx-brand-copy {
  display: grid;
  gap: .18rem;
  line-height: 1;
}

.nx-brand-copy strong {
  font-size: .82rem;
  font-weight: 850;
  letter-spacing: .19em;
}

.nx-brand-copy small {
  color: var(--nx-muted);
  font-size: .58rem;
  font-weight: 720;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.nx-live {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  color: #64665f;
  font-size: .67rem;
  font-weight: 760;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.nx-live i {
  width: .48rem;
  height: .48rem;
  border-radius: 50%;
  background: #6caa3c;
  box-shadow: 0 0 0 .28rem rgb(108 170 60 / 13%);
}

.nx-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(22rem, .92fr);
  align-items: stretch;
  gap: 1.15rem;
  width: min(100%, 68rem);
  margin: auto;
}

.nx-manifest,
.nx-auth {
  min-height: 36.5rem;
  border-radius: 2rem;
}

.nx-manifest {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 2.15rem;
  color: #f8f7f2;
  background: var(--nx-ink);
  box-shadow: 0 2rem 5rem rgb(25 26 23 / 18%);
}

.nx-manifest::before {
  position: absolute;
  top: -8rem;
  right: -6rem;
  width: 22rem;
  height: 22rem;
  border: 1px solid rgb(223 255 99 / 22%);
  border-radius: 50%;
  box-shadow:
    0 0 0 2.8rem rgb(223 255 99 / 4%),
    0 0 0 6rem rgb(223 255 99 / 2%);
  content: "";
}

.nx-manifest::after {
  position: absolute;
  right: -3.5rem;
  bottom: -5rem;
  width: 19rem;
  height: 19rem;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 38%, rgb(255 112 81 / 40%), rgb(255 112 81 / 0%) 68%);
  content: "";
}

.nx-manifest-index,
.nx-manifest-sign {
  position: relative;
  z-index: 2;
  color: rgb(248 247 242 / 48%);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .12em;
}

.nx-orbit {
  position: absolute;
  top: 3.65rem;
  right: 2.2rem;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 7.6rem;
  height: 7.6rem;
  border: 1px solid rgb(248 247 242 / 18%);
  border-radius: 50%;
  transform: rotate(-9deg);
}

.nx-orbit::before {
  width: 4.65rem;
  height: 4.65rem;
  border: 1px solid rgb(223 255 99 / 46%);
  border-radius: 50%;
  content: "";
}

.nx-orbit-core {
  position: absolute;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: .8rem;
  color: var(--nx-ink);
  background: var(--nx-lime);
  font-size: 1rem;
  font-weight: 880;
  transform: rotate(9deg);
}

.nx-orbit-dot {
  position: absolute;
  top: .35rem;
  right: 1.05rem;
  width: .8rem;
  height: .8rem;
  border: .18rem solid var(--nx-ink);
  border-radius: 50%;
  background: var(--nx-coral);
}

.nx-manifest-copy {
  position: relative;
  z-index: 2;
  margin: auto 0 2.1rem;
  font-size: clamp(3.65rem, 7vw, 6.8rem);
  font-weight: 780;
  letter-spacing: -.075em;
  line-height: .78;
}

.nx-manifest-copy .nx-accent-word {
  margin-top: .18em;
  color: var(--nx-lime);
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 500;
  letter-spacing: -.06em;
}

.nx-manifest-copy p {
  margin: 1.75rem 0 0 .35rem;
  color: rgb(248 247 242 / 61%);
  font-size: .88rem;
  font-weight: 480;
  letter-spacing: -.015em;
  line-height: 1.5;
}

.nx-auth {
  display: flex;
  flex-direction: column;
  padding: 3.1rem 3rem 2rem;
  border: 1px solid var(--nx-line);
  background: rgb(251 250 246 / 96%);
  box-shadow: 0 1.5rem 4rem rgb(25 26 23 / 8%);
  backdrop-filter: blur(1.15rem);
}

.nx-auth-head {
  margin-bottom: 2.25rem;
}

.nx-kicker {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1.15rem;
  color: #62645d;
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.nx-kicker::before {
  width: 1.4rem;
  height: .18rem;
  border-radius: 99px;
  background: var(--nx-coral);
  content: "";
}

#kc-page-title {
  margin: 0;
  color: var(--nx-ink);
  font-size: clamp(2.35rem, 4.7vw, 3.5rem);
  font-weight: 720;
  letter-spacing: -.065em;
  line-height: .98;
}

.nx-subtitle {
  margin: 1rem 0 0;
  color: var(--nx-muted);
  font-size: .91rem;
  line-height: 1.55;
}

.nx-content {
  flex: 1;
}

.nx-form,
#kc-form-login {
  width: 100%;
}

.nx-field {
  margin: 0 0 1.15rem;
}

.nx-label {
  display: inline-block;
  margin-bottom: .48rem;
  color: #484a44;
  font-size: .74rem;
  font-weight: 760;
  letter-spacing: .015em;
}

.nx-input,
input.nx-input {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 3.35rem;
  padding: 0 .95rem;
  border: 1px solid rgb(25 26 23 / 16%);
  border-radius: .85rem;
  outline: 0;
  color: var(--nx-ink);
  background: var(--nx-white);
  box-shadow: 0 1px 0 rgb(255 255 255 / 80%) inset;
  font-size: .98rem;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.nx-input:hover {
  border-color: rgb(25 26 23 / 31%);
}

.nx-input:focus {
  border-color: #7e941f;
  box-shadow: 0 0 0 .25rem var(--nx-focus);
}

.nx-input[aria-invalid="true"] {
  border-color: var(--nx-danger);
}

.nx-input:-webkit-autofill,
.nx-input:-webkit-autofill:hover,
.nx-input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--nx-ink);
  box-shadow: 0 0 0 1000px var(--nx-white) inset;
}

.nx-input-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 3.35rem;
  gap: .55rem;
}

.nx-password-toggle {
  position: relative;
  display: grid;
  place-items: center;
  width: 3.35rem;
  min-width: 3.35rem;
  min-height: 3.35rem;
  padding: 0;
  border: 1px solid rgb(25 26 23 / 16%);
  border-radius: .85rem;
  color: var(--nx-ink);
  background: #efeee8;
  cursor: pointer;
}

.nx-password-toggle::before {
  width: 1.05rem;
  height: .7rem;
  border: 2px solid currentColor;
  border-radius: 70% 30% 70% 30%;
  content: "";
  transform: rotate(45deg);
}

.nx-password-toggle::after {
  position: absolute;
  width: .28rem;
  height: .28rem;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.nx-password-toggle i {
  display: none;
}

.nx-button,
input.nx-button,
button.nx-button {
  min-height: 3.35rem;
  padding: 0 1.15rem;
  border: 1px solid transparent;
  border-radius: .85rem;
  font-size: .88rem;
  font-weight: 780;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.nx-button-primary {
  border-color: var(--nx-ink) !important;
  color: #f8f7f2;
  background: var(--nx-ink);
}

.nx-button-primary:hover {
  border-color: #31342b !important;
  background: #31342b;
  transform: translateY(-1px);
}

.nx-button-primary:active {
  transform: translateY(0);
}

.nx-button-primary:focus-visible,
.nx-password-toggle:focus-visible,
a:focus-visible {
  outline: .2rem solid var(--nx-focus);
  outline-offset: .15rem;
}

.nx-button-block {
  width: 100%;
}

.nx-button-secondary {
  border-color: var(--nx-line);
  color: var(--nx-ink);
  background: transparent;
}

#kc-form-options:empty,
.nx-field:has(#kc-form-options:empty),
.nx-info:empty {
  display: none;
}

.nx-field-error {
  display: block;
  margin-top: .5rem;
  color: var(--nx-danger);
  font-size: .74rem;
  line-height: 1.4;
}

.nx-alert {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: .65rem;
  margin: 0 0 1.2rem;
  padding: .85rem .95rem;
  border: 1px solid rgb(180 58 43 / 26%);
  border-radius: .8rem;
  color: #8d3024;
  background: #fff0ec;
  font-size: .78rem;
  line-height: 1.45;
}

.nx-alert-mark {
  width: .5rem;
  height: .5rem;
  margin-top: .28rem;
  border-radius: 50%;
  background: var(--nx-coral);
}

.nx-current-user {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: -1rem 0 1.5rem;
  padding: .75rem .85rem;
  border: 1px solid var(--nx-line);
  border-radius: .75rem;
  background: #f1f0ea;
  font-size: .78rem;
  font-weight: 740;
}

.nx-current-user a {
  color: var(--nx-muted);
  font-size: .69rem;
  font-weight: 650;
}

.nx-info,
.instruction {
  color: var(--nx-muted);
  font-size: .82rem;
  line-height: 1.55;
}

.nx-auth-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--nx-line);
  color: #92948c;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: .56rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.nx-page-foot {
  color: #8a8c84;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: .56rem;
  letter-spacing: .1em;
}

@media (max-width: 58rem) {
  .nx-page {
    padding-inline: 1.25rem;
  }

  .nx-stage {
    grid-template-columns: minmax(0, 1fr) minmax(20rem, .9fr);
  }

  .nx-manifest-copy {
    font-size: clamp(3.3rem, 8vw, 5rem);
  }

  .nx-auth {
    padding-inline: 2.15rem;
  }
}

@media (max-height: 50rem) and (min-width: 48.01rem) {
  .nx-page {
    grid-template-rows: auto 1fr;
    gap: 1rem;
    padding-block: 1rem;
  }

  .nx-page-foot {
    display: none;
  }

  .nx-auth {
    padding-block: 2.25rem 1.5rem;
  }

  .nx-auth-head {
    margin-bottom: 1.6rem;
  }

  .nx-auth-foot {
    margin-top: 1.4rem;
  }
}

@media (max-width: 48rem) {
  .nx-page {
    display: block;
    padding: 1rem;
  }

  .nx-topbar {
    margin-bottom: 1rem;
  }

  .nx-stage {
    grid-template-columns: 1fr;
  }

  .nx-manifest {
    min-height: 10rem;
    padding: 1.4rem;
    border-radius: 1.5rem;
  }

  .nx-manifest-index,
  .nx-manifest-sign,
  .nx-manifest-copy p {
    display: none;
  }

  .nx-manifest-copy {
    margin: auto 0 0;
    font-size: 3rem;
    line-height: .8;
  }

  .nx-orbit {
    top: 1.25rem;
    right: 1.5rem;
    width: 6rem;
    height: 6rem;
  }

  .nx-orbit::before {
    width: 3.6rem;
    height: 3.6rem;
  }

  .nx-auth {
    min-height: 0;
    padding: 2.35rem;
    border-radius: 1.5rem;
  }

  .nx-page-foot {
    margin-top: 1.2rem;
  }
}

@media (max-width: 30rem) {
  .nx-brand-copy small,
  .nx-live {
    font-size: 0;
  }

  .nx-live {
    padding-right: .4rem;
  }

  .nx-auth {
    padding: 2rem 1.4rem 1.4rem;
  }

  .nx-auth-head {
    margin-bottom: 1.75rem;
  }

  #kc-page-title {
    font-size: 2.45rem;
  }

  .nx-auth-foot span:first-child,
  .nx-page-foot span:last-child {
    display: none;
  }

  .nx-page-foot {
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
